Mysql Statement Snippets


19 May, 2012   

Example code to load CSV back into mySQL

22 December, 2012   

How to update random dates in MYSQL table

Handy helper function which parses about any date and returns the same date in MySQL date/time format.

22 February, 2018   

MySQL Code Snippets to Export Table to File CSV

23 October, 2012   

MySQL code example for sorting data in a GRID

05 July, 2012   

Backup MySQL Database to SQL File with mysqldump

Returns the text between the specified delimiters in MySQL.

Returns the text between the specified delimiters in MySQL.

In order for this to work, you will need to copy mysqldump.exe and mysql.exe from the MySQL bin Program Files folder into the same directory as your executing PHP script. If you know the direct path to these for your server, you can use those instead.

Exam code to backup MySQL Database to SQL File

This code will break a string of words up along the spaces and do a mySQL search for each of the words in the string.

This code will break a string of words up along the spaces and do a mySQL search for each of the words in the string.

11 July, 2013   

Help manage mysql database common task

PHP code to convert MySQL date to UNIX timestamp

An example C++ code for using the same variable name in different scopes by Ali Murad

17 December, 2011   

In a table, some of the columns may contain duplicate values. Sometimes you will need to list only the different (distinct) values in a table. The DISTINCT keyword can be used to return only distinct (different) values.

11 August, 2012   

MySQL code to find and replace string

16 March, 2014   

How to create mysql table using php. The php script as follows as:

This sql statement enables to detect duplicates entries over a key and creates a seq column which says which one is the sequence of the duplicates. This way you can take only the seq = 1 and still be able to identify all duplicates

26 February, 2015   

Simple and easy mySQL code to select the row number