Somebody...i need some help
Posted: Sun Nov 01, 2009 8:38 pm
This is my code..
$sql = "INSERT INTO template (file,file_ext, file_size, file_data,tarikh_kemaskini) ";
$sql.= "VALUES (";
$sql.= "'{$file}', '{$file_ext}', '{$file_size}', '{$file_data}','{CURDATE()}' WHERE id='$id'";
Error occur said like this :
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 'WHERE id='1'' at line 1
The error maybe at WHERE id='$id'"; syntax and how to overcome this problem??
Help me.....
$sql = "INSERT INTO template (file,file_ext, file_size, file_data,tarikh_kemaskini) ";
$sql.= "VALUES (";
$sql.= "'{$file}', '{$file_ext}', '{$file_size}', '{$file_data}','{CURDATE()}' WHERE id='$id'";
Error occur said like this :
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 'WHERE id='1'' at line 1
The error maybe at WHERE id='$id'"; syntax and how to overcome this problem??
Help me.....