Useful MySQL Commands and Code Snippets

Links Pages or Directory Pages
These are some MySQL commands, functions, code snippets, and code examples we have found useful in creating websites for ourselves and our clients.


  • Using LOAD DATA INFILE LOCAL for Loading Flat Files or Fixed Record Files:  Load the data into a table with only binary or integer fields. Binary for character/date data, integer for numeric. Then convert the fields from binary to char/varchar or date. Convert integer fields to decimal with precision included; ie: import numeric(9,3) as integer(12), convert to numeric(12,3), then UPDATE table SET field = field/1000.

Useful PHP Scripts, Functions and Code Snippets
Useful Javascript Tips and Code Snippets
Useful Perl Scripts, Functions and Code Snippets
Useful MediaWiki Extensions, Scripts, Functions and Code Snippets