Welcome To Snipplr


Everyone's Recent PHP Snippets Tagged query



« Prev 1 2
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 9097 posted 7 years ago by interviewqueries
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 2142 posted 14 years ago by o0110o
Snippet to show a simple use of the transient API when querying posts.
0 2080 posted 14 years ago by Mat_
Function to prevent sql injection in Like queries, where the characters '_' and '%' can be dangerous.
0 3519 posted 14 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 3048 posted 14 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 2341 posted 14 years ago by lemcoe9
Connect to and query a db2 database using php.
0 1950 posted 14 years ago by zombree
1 2244 posted 14 years ago by paul0078
0 1724 posted 15 years ago by atul
0 1832 posted 15 years ago by ronal
0 1772 posted 15 years ago by pmalerba
Query any Post Type anywhere
0 1572 posted 15 years ago by zealmurapa
0 1739 posted 15 years ago by rliverman
run mysql query direct on your magento script
0 1752 posted 16 years ago by aashvi
To use: $update_sql = querys($sql); or $select_sql = getresult($sql); Used simplify selecting rows from a database. You'll need to pass in the SQL statement.
0 2022 posted 16 years ago by shawntysco
Uses action hook of the hybrid theme framework to launch function that modifies the query on the archive page for category 6.\\r\\n\\r\\nSorts by the custom field \\\"event_date\\\" and compares it to the current date.\\r\\n\\r\\nBased on [goto11\\\'...
0 1913 posted 16 years ago by hussong
0 1299 posted 16 years ago by neverdark
1 1841 posted 16 years ago by vagrantradio
0 1716 posted 16 years ago by fatihturan
0 1710 posted 17 years ago by gfazioli
0 2017 posted 17 years ago by iloveitaly
More of a setQueryString
0 1788 posted 17 years ago by iloveitaly
Magic quotes for incoming GET/POST/Cookie data. This feature has been DEPRECATED as of PHP 5.3.0 and REMOVED as of PHP 6.0.0. Relying on this feature is highly discouraged.
0 1805 posted 17 years ago by lzyy
« Prev 1 2