Hi, I wrote a simple php script to insert a comma seperated file into an sql database. The csv file is very large, and it stops loading on 1/10th of the file, so the sql databank is not updated completely... are there restrictions in size or so?? any help?
Thanks!
Johan
this is my upload script , it gives the text "database error", but 1/10th of the file is inserted. the csv file is +/- 1MB in size
<?
require("config.php");
require("connection.inc");
$row = 1;
$fp = fopen ("test.csv","r");
while ($data = fgetcsv ($fp, 1000, ",")) {
$nummer=$data[0];
$groep=$data[1];
$omschr=$data[2];
$afm=$data[3];
$prijs1=$data[4];
$prijs2=$data[5];
$verpakking=$data[6];
$query="INSERT INTO prijslijst (nummer,groep,omschr,afm,prijs1,prijs2,verpakking) VALUES ('$nummer', '$groep', '$omschr', '$afm', '$prijs1', '$prijs2', '$verpakking');";
$result = mysql_query($query) or die ("database error");
}
fclose ($fp);
?>