Click to See Complete Forum and Search --> : how to import data from csv to mysql
themoon
11-19-2007, 04:46 AM
Hi
I have a big csv file and would like to import this file to mysql database.
Is there any php script that to this.
I found some ready script but doesn't work.
any recommended links/scripts ?
Thanks in advance.
M
NogDog
11-19-2007, 05:03 AM
If you use phpMyAdmin, it has a built-in ability to import a CSV file into a selected table.
themoon
11-19-2007, 05:22 AM
Thanks Nogdog
I am using PhpMyAdmin 2.9.2
I clicked on a table name then, i clicked on import
Then selected CSV from the radio button
I found a field called:"Column names"
I don't know what type in there ? is it culumn name of the csv file or the field name of the table ?
How to match with both ?
Appreciate your guide
Thanks
NogDog
11-19-2007, 06:29 AM
I believe that should be a comma-separated list of table column names, matching the order that they appear in the CSV file.
themoon
11-21-2007, 11:33 PM
Thanks NogDog
I will try that out
Best Regard :)