 |
insert ลงmysql ไม่ได้ ErrorYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'update,update_user) values(null,'หกดหก','หกดหกด�' at line 1 |
|
 |
|
|
 |
 |
|
Code (PHP)
$sql = "INSERT INTO dept (dept_id,dept_code,dept_name,status,update,update_user)
values (null,'$dept_code','$dept_name','$status','$datetime','$update_user')";
$sqlquery = mysql_query($sql)or die(mysql_error());
if ($sqlquery){ echo"ok";
}else{echo"no";}
ขึ้น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 'update,update_user) values(null,'หกดหก','หกดหกด�' at line 1
ผิดตรงไหน ????
Tag : PHP, MySQL
|
|
 |
 |
 |
 |
Date :
2011-03-13 14:48:06 |
By :
51035354 |
View :
909 |
Reply :
1 |
|
 |
 |
 |
 |
|
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
update เป็น reserved words ครับ เปลี่ยนชื่อฟิลด์ซะ หรือว่าจะใช้จริงๆ ต้องใส่ `update`
|
 |
 |
 |
 |
Date :
2011-03-13 15:10:20 |
By :
PlaKriM |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|