I just want to insert a bunch of records into a table with fields, let's say, A and B. I can do this from phpAdmin with a statement like:
INSERT INTO table SET A=1,B=2;
INSERT INTO table SET A=9,B=24;
and so on which works fine.
When I generate a similar query with a loop and create a variable $sql using something like
for ($j=0;$j<something;$j++){
$sql .="INSERT INTO table SET A=$a,B=$b;\r\n";
}
the sql fails and it says I have an error near the second insert. I have tried all combinations of terminations, with and without \r, \n etc but nothing works. What am I doing wrong??
Dave