Welcome To Snipplr

Everyone's Recent Snippets Tagged query

« Prev 1 2 3 4 5
In Laravel you can use "IN" query as Using Eloquent $data = YourModel::whereIn('id', array(1, 2, 3))->get(); Using DB Query builder $data = DB::table('your_table')->whereIn('id', array(1, 2, 3))->get();
0 1198 posted 1 year ago by interviewqueries
Show the output of a query in a more readable vertical format
0 416 posted 5 years ago by rm1984
This is code you put in a CSS file. It queries the size of the screen using the parameters passed in. If its true, it then applies the CSS
0 413 posted 5 years ago by heathbo
Unlike linked style sheets, it is necessary to enclose CSS in Headers in a "style type". This example media query is for screens under 1024 (tablets and phones) to make sure the images do not extend beyond the layout.
0 415 posted 6 years ago by jefferis
coldfusion snippet to output a query recordset into multiple columns
1 451 posted 7 years ago by dreamstarter
Now make a request to page.html?x=Hello: console.log(getQueryVariable('x'));
0 310 posted 7 years ago by buda9
A couple of useful media queries...
1 363 posted 7 years ago by iroybot
Wrapper over JPA query that avoid flush
0 342 posted 7 years ago by pachaman
This SQL statesment help you to understand which trigger is going to execute first and which one is going to execute last.
0 324 posted 8 years ago by edwinet
PostgreSQL wildcard search for any of a list of words, returns true or false depending on whether its pattern matches the given string.
0 338 posted 8 years ago by alecolucci
The sysprotects system table reports all of the permissions granted or denied in a given database. We'll need to join it with sysusers and sysobjects to get all the information we need. Here's an example query that only pulls information on objects (...
0 367 posted 8 years ago by edwinet
Get Parameter from url query string
0 394 posted 8 years ago by goo
I needed a quick way to target high-resolution graphics. Here was my final solution
0 327 posted 8 years ago by chrisaiv
If you need to get the whois information for a specific domain, why not using PHP to do it? The following function take a domain name as a parameter, and then display the whois info related to the domain.
1 343 posted 8 years ago by o0110o
Our theme's range of media queries
0 296 posted 8 years ago by vanseijen
Blank HTML template with minimal hosted srcs and respond.js
0 431 posted 8 years ago by jerryhdev
Snippet to show a simple use of the transient API when querying posts.
0 279 posted 8 years ago by Mat_
You could start a transaction before running your queries and then rollback after running them. Note that to do this you'll require InnoDB or XtraDb tables (won't work on MyISAM).
0 344 posted 8 years ago by satie83
Function to prevent sql injection in Like queries, where the characters '_' and '%' can be dangerous.
0 376 posted 9 years ago by TimoZachi
This function allow you ti have multiple parameters in your query string. Ex : id=12&name=Doe&id=42&nickname=Monster
0 302 posted 9 years ago by MonsterDev
Takes your table name and key=>value array of values and returns the text for inserting into a MySQL database. Automatically surrounds strings with single quotes.
1 320 posted 9 years ago by lemcoe9
Connect to and query a db2 database using php.
0 285 posted 9 years ago by zombree
Snippet to illustrate the three actions that happen in all LINQ query operations.
0 350 posted 9 years ago by denakitan
1 335 posted 9 years ago by paul0078
This will get the arguments on the query string and put them into a handy array.
0 343 posted 9 years ago by brownrl
0 293 posted 9 years ago by cesarkohl
Pass variables into javascript files using query strings, and return them using getJSvars() Example //HTML <script> //return the value of "foo" getJSvars('filename.js', 'foo');
0 299 posted 9 years ago by DenoteIt
0 336 posted 10 years ago by nickaranz
« Prev 1 2 3 4 5