currently, my script is reading a file, and when it gets to line 4, it parses the data and assigns it to an array. i'm trying to dump that array into a table, but i'm having problems. here is the call
Code: Select all
<?php
elseif ($line_no > 4)
{
// Read column and update.
$info_data = preg_split("/[\s]+/", $line_data);
$qry="insert into TABLE loginfo values('".$info_data[0]."','".$info_data[1]."')";
mysql_query($qry) or die(mysql_error());
}
?>i've tried sitting it outside of the loop, but it has the same result ( except it only reads the last value that the array is assigned but still generates the same error).You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'TABLE loginfo values('213.111.11.14','2003-10-18')' at line 1
any help would be appreciated.