Daedal
Junior Poster in Training
75 posts since Apr 2008
Reputation Points: 23
Solved Threads: 12
pritaeas
Posting Expert
5,480 posts since Jul 2006
Reputation Points: 653
Solved Threads: 875
How about letting MySQL do the dirty work:
load data local infile 'infile.csv' into table yourtable
fields terminated by ','
enclosed by '"'
lines terminated by '\n'
(column1,column2,column3)
This example is for a line that looks like this: 'data','data','data'
(delimited by a comma and enclosed by quotes
Be sure to remove any headers or other non-important data from the csv file
Nick Evan
Not a Llama
10,112 posts since Oct 2006
Reputation Points: 4,142
Solved Threads: 403
niek_e provided a good example. Use what he has provided, and then implement an upload script. Just substitute the 'infile.csv' for the file that has been uploaded. You're asking for a lot, eh? Everything done for you? Teach a man to fish... :)
Daedal
Junior Poster in Training
75 posts since Apr 2008
Reputation Points: 23
Solved Threads: 12
No no, you're fine... maybe start a new thread about handling PHP file uploads.
Daedal
Junior Poster in Training
75 posts since Apr 2008
Reputation Points: 23
Solved Threads: 12