Useful MySQL Commands and Code Snippets
These are some MySQL commands, functions, code snippets, and code examples we have found useful in creating websites for ourselves and our clients.
- MySQL Table with All Data Types
- Use PHP to Get a Default Values Array
- Use LOAD DATA to load CSV Data
- 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.