Welcome To Snipplr


Everyone's Recent Snippets Tagged database



A Django model manager capable of using different database connections. Inspired by: * [Eric Florenzano](http://www.eflorenzano.com/blog/post/easy-multi-database-support-django/) * [Kenneth Falck](http://kfalck.net/2009/07/01/multiple-data...
1 110 posted 11 years ago by rix
From StackOverflow. I'm still not quite happy with my understanding of it, but it looks an order of magnitude more elegant than most I've found.
0 124 posted 11 years ago by rengber
If a "InReplyToID" is provided, it must be a valid MessageId
1 173 posted 11 years ago by rengber
0 70 posted 11 years ago by iloveitaly
This is a long over due update to my db insert building function. Please not that the function is the important part the code below is just prove that it works... l:-)
1 80 posted 11 years ago by brownrl
1 103 posted 11 years ago by StrawMan
Use to get all database results on a SQL query
0 78 posted 11 years ago by erichelgesen
granting DB specific and general access priveleges from the CLI
1 86 posted 11 years ago by stiobhart
CLI commands for backing up mySQL database
2 125 posted 11 years ago by stiobhart
Use this function to print out all the rows in a table. Specify columns to show using the columnstring parameter: tablulardata(tablename, columnstring); ie: tabluardata("users","username=Username|fname=First Name|lname=Last Name");
1 93 posted 11 years ago by kilrizzy
Use this function to pull all columns from a single database field. getrowdata(tablename,rowid,prefix); You would call this function like: getrowdata("users",$_SESSION['user'],"user_"); The prefix is the prefix you want for the array names,...
1 97 posted 11 years ago by kilrizzy
For a client I needed a bit of code that could split one file (html, editable through wysiwyg editor) to multiple files, since all files would by default become very long. This code splits one file by the <h1> tag. Easy for end-users to set. Use CSS...
0 107 posted 11 years ago by axtg
This will create a Navigation from a MySQL database table names. It removes the table name "includes" by default so you can see how to remove any certain tables you wish to not use as a site section. Just plug in your MySQL database details and co...
3 105 posted 11 years ago by jiggyhat
Tags: C3P0, datasource, spring, database, java
1 286 posted 11 years ago by mahome
8 112 posted 11 years ago by michaelfox
This sql query will select the past version information about a given file from the database. An example would be searching for %ApprovalHistoryVOImpl% would return all past version numbers (in the database) for the ApprovalHistoryVOImpl.class file....
0 87 posted 11 years ago by theonlyalterego
2 104 posted 11 years ago by iTony
That's not complete enough! but as useful as a knife :/
8 234 posted 11 years ago by lajevardi
This is a method of my database class which let me sift the unsafe data inputs down.
3 152 posted 11 years ago by lajevardi
This as it sits isn't an improvement on what happens by default. It's only useful combined with a compensating transaction or sad path in the catch block, or in allowing a loop to continue.
0 115 posted 11 years ago by rengber
0 161 posted 11 years ago by webonomic
Minimal syntax for cursor use. See URL for SQL 2005 options and improvements.
0 127 posted 11 years ago by rengber
paste it in wp-config.php and make sure the prefixes are right (wp_* is default) also the blogs must be installed on the same database with different prefixes. For example, you might have a primary blog with the table prefix wp_ on the database...
0 82 posted 11 years ago by philiph