Re: [PHP] Text from Excel csv file loaded into MySQL table

2006-10-17 Thread Richard Lynch
On Tue, October 17, 2006 2:36 am, Alan Milnes wrote: >> > $file = fopen($filename, "r") or die("Could not open $filename"); >> while (!feof($file)){ >> $values = fgetcsv($file, 100); >> array_walk($values, 'mysql_real_escape_string'); >> $values_sql = implode("', '", $values); >

Re: [PHP] Text from Excel csv file loaded into MySQL table

2006-10-17 Thread Alan Milnes
Richard Lynch wrote: Ah... Try something like this: This assumes that no record (all 4 fields) with overhead is move than 1Mb in size -- Change the 100 if you have monster fields. And count on needing to tweak my.cnf in that case anyway. Looks a lot neater than my code! Is it version

Re: [PHP] Text from Excel csv file loaded into MySQL table

2006-10-16 Thread Richard Lynch
On Mon, October 16, 2006 11:01 am, Alan Milnes wrote: > Chris Boget wrote: >>> Can anyone point me to a really good end to >>> end tutorial on extracting text from an Excel >>> csv file and uploading it into MySQL via a >>> PHP script? >> >> Actually, depending on the integrity of the data and the

Re: [PHP] Text from Excel csv file loaded into MySQL table

2006-10-16 Thread Alan Milnes
Chris Boget wrote: Can anyone point me to a really good end to end tutorial on extracting text from an Excel csv file and uploading it into MySQL via a PHP script? Actually, depending on the integrity of the data and the consistency of the format in the CSV file, you can do this simply

Re: [PHP] Text from Excel csv file loaded into MySQL table

2006-10-16 Thread Richard Lynch
On Mon, October 16, 2006 10:40 am, Alan Milnes wrote: > Can anyone point me to a really good end to end tutorial on extracting > text from an Excel csv file and uploading it into MySQL via a PHP > script? There are lots of bits and pieces on the Web and in the PHP If the files are NOT clean enoug

RE: [PHP] Text from Excel csv file loaded into MySQL table

2006-10-16 Thread KermodeBear
Hello, > > Can anyone point me to a really good end to end tutorial on > extracting > > text from an Excel csv file and uploading it into MySQL via a PHP > > script? > > Actually, depending on the integrity of the data and the > consistency of the format in the CSV file, you can do this > s

RE: [PHP] Text from Excel csv file loaded into MySQL table

2006-10-16 Thread Chris Boget
> Can anyone point me to a really good end to > end tutorial on extracting text from an Excel > csv file and uploading it into MySQL via a > PHP script? Actually, depending on the integrity of the data and the consistency of the format in the CSV file, you can do this simply and easily using