/ Published in: MySQL
ensure the url to the csv file is in the root of your file system (eg: C:/mycsvfile.csv)
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
LOAD DATA LOCAL INFILE '/file.csv' INTO TABLE `table_name` FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n' (field1,field2,etc)