Welcome To Snipplr
Everyone's Recent Snippets Tagged database
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
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
1440
posted 16 years ago by jonhenshaw
Active Record ORM implementation in ActionScript 3 for AIR's SQLite DB
0
747
posted 16 years ago by bendalton
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
837
posted 16 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
1418
posted 16 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
1816
posted 16 years ago by dom111
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
1081
posted 16 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
1199
posted 16 years ago by zingo
You can generate a simple bar chart of the values by executing this command...
0
1017
posted 17 years ago by zingo
Gets an mp3 player to play mp3s which contain all the phrases given as arguments. Locate is much faster than xmms' library, usually in split a second.
This is very handy, when you install a command-line into the wm panel.
Creates files /locate.0, /...
1
973
posted 17 years ago by Adek336
This class operates a range of mysql functions base on arrays.
Example:
Name:
Description:
22
5735
posted 17 years ago by emuen