How can I import csv files into mySQL?
look at MYSQL’s LOAD DATA INFILE command: LOAD DATA INFILE “datafile.csv” INTO TABLE mytable FIELDS TERMINATED BY ‘,’ OPTIONALLY ENCLOSED BY ‘”‘ LINES TERMINATED BY ‘n’ More information is at: http://www.mysql.com/doc/L/O/LOAD_DATA.html You can also use phpMyAdmin: http://www.phpwizard.net/projects/phpMyAdmin/ Finally, you can also simply read the csv into a variable with fgets, and dump them into a db with a sql statement like: $sql = “INSERT into table (field1, field2, field3) values($fileRow)”; Watch out for trouble with ms creating lines line field1,,,field4 which can be converted to field1,”,”,field4 with str_replace.