RE: [PHP] loading data into mysql from txt file from php

2001-07-03 Thread Don Read
On 03-Jul-01 Clif Wieden wrote: > I have a project where the admin uploads a new data file and it needs to > be loaded into a mysql database. What's the best way to do this? The > data file is tab-delimted but could be reformatted. > > Right now the file is uploaded and after copy($new_file, $fi

Re: [PHP] loading data into mysql from txt file from php

2001-07-03 Thread mike cullerton
write a script that reads in each line of the file, uses split() to break the line up at the tabs, and then inserts into the database. $data_array = split([tab],$file); $query = "insert into table values ($data_array[0], $data_array[1],...) you'll have to look up the regular expression for tab