Page 1 of 1

How can I use fgetcsv() to load or import each row of a csv

Posted: Sun Nov 28, 2010 4:06 pm
by phillyrob
How can I use fgetcsv() to load or import each row of a csv into different tables in mysql php . Each row would load into a different table. Or is there a better way than fgetcsv() ?

Re: How can I use fgetcsv() to load or import each row of a

Posted: Sun Nov 28, 2010 5:53 pm
by icepick
I have built some code on this issue a while ago, and set up an example that is posted here:
http://forum.datagen.eu/viewtopic.php?f ... it=csv#p30

It is written in Portuguese, but you can easely have your browser translating it. Basically it does what you want . One server must retrieve remote pictures from another. These pictures URL's are written in a csv file, so the whole thing is about parsing every line of that CSV file in order to get the URL, then importing the pictures.

Go nuts!

Re: How can I use fgetcsv() to load or import each row of a

Posted: Sun Nov 28, 2010 8:05 pm
by phillyrob
Thx Icepick I will try it.