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 731 posted 15 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 862 posted 15 years ago by rengber
0 723 posted 15 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 666 posted 15 years ago by brownrl
1 930 posted 15 years ago by StrawMan
Use to get all database results on a SQL query
0 744 posted 15 years ago by erichelgesen
granting DB specific and general access priveleges from the CLI
1 840 posted 15 years ago by stiobhart
CLI commands for backing up mySQL database
2 1010 posted 15 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 745 posted 15 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 865 posted 15 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 857 posted 15 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 858 posted 15 years ago by jiggyhat
Tags: C3P0, datasource, spring, database, java
1 2012 posted 15 years ago by mahome
8 893 posted 15 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 861 posted 15 years ago by theonlyalterego
2 895 posted 15 years ago by iTony
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 856 posted 15 years ago by rengber
0 1053 posted 15 years ago by webonomic
Minimal syntax for cursor use. See URL for SQL 2005 options and improvements.
0 930 posted 15 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 639 posted 15 years ago by philiph
3 834 posted 15 years ago by oli
how to rollback data on grails' service .... for myutil --> please look at
0 756 posted 15 years ago by callmeblessed
I need to create all table in InnoDB in my grails application. you can add this / edit the following code on grails-app/conf/Datasource.groovy
1 1155 posted 15 years ago by callmeblessed
This snippet is actually tested for SQL Server Compact Edition (CE) 3.5, but it will probably work for other SQL Server editions. Once you have an SQL CE db up and running, you can set the connection string to point to any directory and database by s...
0 1355 posted 15 years ago by pckujawa
Useful for taking incorrectly-formatted UTF-8 strings containing HTML data, and converting them to correctly-formatted UTF-8 plain text. A handy tool for displaying HTML stored in a database.
4 1895 posted 15 years ago by X3Maverick