[Phpwm] CSV to mysql

Richard Hayes ricky at domainarena.net
Tue Nov 14 22:32:41 GMT 2006


Hello.

> years, i downloaded a 10 meg csv file and am curious about the best way to 
> convert it into a mysql table,

I would recommend Navicat (http://www.navicat.com/download.html), which is 
quite a good MySQL management tool that we use at work. It's got all kinds 
of options for taking CSV (et al) type files and putting them into tables. 
It's got a reasonable interface, too.

The demo will certainly get you started.

Another solution (if applicable) would be to write a PHP script that would 
split the lines in the file by the delimiter (a comma in your case), and the 
newly created array items could be inserted in the table fields.

If you'd like any example PHP code, I'd be happy to supply.

--Ricky. 





More information about the Phpwm mailing list