Welcome To Snipplr


Everyone's Recent Snippets Tagged database



how to rollback data on grails' service .... for myutil --> please look at
0 316 posted 12 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 552 posted 12 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 629 posted 12 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 1131 posted 13 years ago by X3Maverick
This is a simple but powerful tweak to the wp-config.php file that will make it easy to run multiple websites using one database and codebase. Simply change "yourdomain.com" with your domain and that's it. Repeat that line for new domains.
2 472 posted 13 years ago by jonhenshaw
1 418 posted 13 years ago by ghwilson4456
0 769 posted 13 years ago by webonomic
I always forget how to do this...
2 311 posted 13 years ago by davidsword
Active Record ORM implementation in ActionScript 3 for AIR's SQLite DB
0 274 posted 13 years ago by bendalton
0 304 posted 13 years ago by DaveChild
This script should be run from the "master" database. It will destroy the dev copy of a database and restore from the live copy. Code slightly modified from original (linked).
0 270 posted 13 years ago by DaveChild
Drupal helper function to debug a table. Returns the contents and some explanation of a database table in a rendered format (HTML table). **NOTE** You REALLY do not want to put this function behind any kind of menu_callback and/or on other pages....
1 475 posted 13 years ago by berkes
Been wanting to made one of these for a while and finally I got round to it. For some examples please visit the post: http://www.dom111.co.uk/blog/coding/db/8 Any comments suggestions appreciated. CreativeCommons ShareAlike
3 663 posted 13 years ago by dom111
0 332 posted 13 years ago by mikegreen
I deleted the old one by accident trying to edit it.
9 608 posted 13 years ago by mattkenefick
0 260 posted 13 years ago by Meestercor
1 316 posted 13 years ago by mikegreen
Any time I make PHP applications that interact with a database, I use this script. It generates one or more self-populating "View Objects" (a class that represents a single record from a DB). For example, rather than access a MySQL record-set by arra...
1 404 posted 13 years ago by donkawechico
You can store an IP address in an INT UNSIGNED (4 bytes) which is of course much more efficient and faster than a CHAR(15). MySQL has two built-in functions: INET_ATON() and INET_NTOA(). These two functions are used allover the place in any TCP/IP s...
0 440 posted 13 years ago by zingo
$duplicates checks and groups duplicated rows with the same field1 and field2 (like comments maybe) and $limit counts how many times a row is duplicated.
3 416 posted 13 years ago by Abe
0 355 posted 13 years ago by jpdamen
Courtesy of Jesse.
2 374 posted 14 years ago by ches
You can generate a simple bar chart of the values by executing this command...
0 360 posted 14 years ago by zingo