I have put together the following code and currently I am getting back a syntax error. In the doc I have read everything seems to look ok, but obviously it is not.
Any suggestions greatly appreciated.
<?php
@ $db = mysql_pconnect('localhost', 'root', '');
if (!$db)
{
echo 'Error: Could not connect to database. Please try again later.';
exit;
}
mysql_select_db('tapelibrary');
$file = "daily\checkin.txt";
$query = "load data infile $file into table tapes (tape_id, file_id, creation_date) fields terminated by ',' lines terminated by '\n'";
$result = mysql_query($query) or die("Error: ".mysql_error());
if ($result)
echo ' Data Inserted Into The Database.<br>';
?>
Thanks. 🙂