Mysql Code Snippets


29 December, 2012   

Example MySql code to append Data to Field in MySql

Advertisements


09 May, 2011   

This is a general code to use when inserting an item from a MySQL database. This code isn't considered definitive and can be written in many varied ways. An extention of this code would be to make sure the entry you are adding to the database doesn't already exist (to save dupicate entries). Note: This code requires you to connect to the...

14 May, 2011   

This is a general code to use when updating an item from a MySQL database. This code isn't considered definitive and can be written in many varied ways. Note: This code requires you to connect to the MySQL database to work. Also, all field and table names need to be set up to match.

14 February, 2012   

MySQL code to connect to db. Don't forget to change the parameters.

14 May, 2011   

This is a general code to use when deleting an item from a MySQL database. This code isn't considered definitive and can be written in many varied ways. A variation of the code would be not to delete the record (as you tend to always need to restore or retrieve it sooner or later) you can add a 'status' field. If status='d' then it is...

If you have a database driven site and you want to optimize MySQL tables then this is perfect. It goes through all the tables in a MySQL database and does table optimization on each one using the MySQL Optimize Table syntax.

Below shown how to Back Up and Restore a MySQL Database

29 December, 2012   

How to Back Up and Restore a MySQL Database

21 May, 2012   

PHP example for connecting to MySQL

16 October, 2012   

MySQL code to generate random string

19 May, 2012   

Example code to create CSV from MySQL

31 December, 2011   

MySQL's MAX aggregate function will find the largest value in a group. here shown an example

22 December, 2012   

How to select a random row in MySQL

14 March, 2013   

PHP code example to process MySQL Timestamp

19 May, 2012   

Example code to load CSV back into mySQL

30 September, 2012   

Mysql function to Fetch entire result set

MySQL MATCH() function performs a natural language search for a string against a text

22 December, 2012   

How to update random dates in MYSQL table

05 July, 2012   

Backup MySQL Database to SQL File with mysqldump

23 October, 2012   

MySQL code example for sorting data in a GRID