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 and use it where i wrote [tab] in the split() command on 7/3/01 3:02 PM, Clif Wieden at [EMAIL PROTECTED] 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, $file_loc) > would like to refresh the db. > > unix box running php4 and mysql 3.22 and of course apache > > Thanks in advance, > clif > -- mike cullerton [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]