Hi there everyone,

OK So I kind of have my CSV utility working nicely, except for one thing - if I import 
the file with PHPMyADMIN it imports over 1000 rows (Which is correct) but with the 
below code on the same file, it's only importing 92 rows, can anyone see anything 
obvious that's wrong?  I think it could be the MySQL query, as I have a count 
statement which counts the number of rows in the loop and it counts correctly and if I 
print the data on the screen it prints the data correctly, just when it writes to the 
DB argghhh i'm going nuts, i've been trying hard to figure it out without hasstling 
the group (Sorry).

$d = "|"; // fields delimiter
$fp = fopen ($userfile, "r");
while ($data = fgetcsv ($fp, 10000, $d)) {
  $num = count ($data);

$count ++;

mysql_query ("INSERT INTO import 

echo $count;

fclose ($fp);

Thanks for any help



Reply via email to