i have a small script that reads a csv, loops through the data and updates the db as it goes.
works great on small amounts of data, but anything over approximately 300 chars long it falls over.
its almost like the script is running too fast for itself and cant catch up...
heres the gist of the script:
<?php
$theCSV = fopen ("myfile.csv","r");
require ("dblogin.php");
$Link = mysql_connect ($Host, $User, $Password);
while ($data = fgetcsv ($theCSV, 2000, ",")) {
$Query = "UPDATE table SET value1 = '$data[1]' WHERE value2 = '$data[0]' ";
mysql_db_query ($DBName, $Query, $Link) or die ("balls up somewhere");
}
fclose ($theCSV);
?>