Welcome To Snipplr


Everyone's Recent Snippets Tagged sql



0 1137 posted 17 years ago by eszpee
1 1331 posted 17 years ago by jags_sonawane
1 1513 posted 17 years ago by zingo
0 1120 posted 17 years ago by Caliban
Generate the SQL necessary to create triggers that use the sequences listed above. NOTE: This particular script assumes that the tables all start with ‘tbl’. It may need to be modified to work with different naming conventions.
0 1230 posted 17 years ago by thecrumb
Generate the SQL necessary to create sequences for every table. NOTE: This doesn’t create sequences. The results need to be copied and run as a script.
0 1513 posted 17 years ago by thecrumb
Get a list of all the user tables.
0 1724 posted 17 years ago by thecrumb
Get all my columns and comments.
0 1208 posted 17 years ago by thecrumb
Noob stuff, but I always end up looking this up.
0 1198 posted 17 years ago by rengber
Small query to help you relocate those modules you are not using anyways.
2 1513 posted 17 years ago by torkil
Pass a user-inputted variable to this function in order to prevent SQL injection. Example: mysql_query("INSERT INTO table VALUES('" . sql_sanitize($_POST["variable") . "')"); Instead of: mysql_query("INSERT INTO table VALUES('" . $_POST["var...
34 10411 posted 17 years ago by engel
Courtesy of Jesse.
2 1749 posted 17 years ago by ches
Created for my own purposes, thought I'd share though ;) copy paste at the top of your file and it does the magic :)
31 7559 posted 18 years ago by peteypablonz
If you are deleting all the rows in a table and you also want to reset the values that will get used by auto increment, this is how to do it.
0 1451 posted 18 years ago by jachin
You can generate a simple bar chart of the values by executing this command...
0 1380 posted 18 years ago by zingo
2 1061 posted 18 years ago by hyperwhat
0 1199 posted 18 years ago by rengber
0 1081 posted 18 years ago by lfbarbieri
0 1148 posted 18 years ago by ryanprel
1 1441 posted 18 years ago by drwitt
1 1190 posted 18 years ago by nicolaspar
Building a SELECT with conditional WHERE parts, given from form-get parameters.
1 1218 posted 18 years ago by assbach
1 1274 posted 18 years ago by Shpigford