 |
PHP MySQL Add/Insert ไม่ได้ครับ MySQL server version for the right syntax to use near 'order) |
|
 |
|
|
 |
 |
|

ไฟล์ insert.php
Code (PHP)
<?php require_once('connect.php');
if (isPost()){
$data = mysql::values(
'informant, id_branch, id_department,
tel, date_informant, id_category, symptoms, id_status ,id_customers,order'
);
$data['date_informant'] = date('Y-m-d H:i:s');
$data['id_status'] = 1;
mysql::insert('tbl_servicerepair',$data);
redirect('repair-report.php');
}
?>
ผมกดบันทึกแล้ว 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 'order) VALUES ('111','1','3','11','2013-09-19 12:22:33','1','111','1','1','111')' at line 1
Tag : PHP
|
|
 |
 |
 |
 |
Date :
2013-09-19 11:48:06 |
By :
lata |
View :
841 |
Reply :
4 |
|
 |
 |
 |
 |
|
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
code อะไรก็ไม่รู้ เยอะแยะไปหมด error มันบอกอยู่แล้วครับ syntax ผิด
data type เป็น int ไม่ต้องมี single quote ครอบนะครับ เผื่อช่วยไรได้ครับ
|
 |
 |
 |
 |
Date :
2013-09-19 11:51:08 |
By :
anotherdie |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
Order คือคำสงวนของ MySQL ครับ
MYSQL RESERVED
|
 |
 |
 |
 |
Date :
2013-09-19 13:09:32 |
By :
mr.win |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ขอบคุณมากครับ ได้ล่ะ
|
 |
 |
 |
 |
Date :
2013-09-19 20:21:30 |
By :
lata |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|

|
 |
 |
 |
 |
Date :
2013-09-20 06:00:00 |
By :
mr.win |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|