【发布时间】:2012-08-18 11:07:24
【问题描述】:
我已尝试修复查询,但仍然无法正常工作
这是错误:
错误号:1064
您的 SQL 语法有错误;检查与您的 MySQL 服务器版本相对应的手册,以在第 3 行的“INSERT INTO user_notifications (
id,usr_id,notification_message,sender`,”附近使用正确的语法从 account_requests 中删除
usrs_id= '' ANDaccount_requesting= '2'; INSERT INTO user_notifications(id,usr_id,NOTIFICATION_MESSAGE,发送, show,日期) VALUES (NULL, '', 'Successful account upgrade. You are now a Tutor', 'Codeg Account Wizard', 1, CURDATE()); INSERT INTO usrs_acc_type (usrs_usr_id,account_type_type_id) VALUES (, 2); UPDATE交易SETORDER_STATUS= 'Completed' WHEREusr_id= ANDpurchase_type= 'Account Upgrade' ANDORDER_STATUS= 'Pending' ANDitem` = '导师账号';文件名:C:\Users\Supremekhaoz\Downloads\Dropbox\htdocs\codeg\system\database\DB_driver.php
行号:330
查询:
DELETE FROM account_requests WHERE `usrs_id` = '$usr_id' AND `account_requesting` = '$type_id';
INSERT INTO user_notifications (`id, `usr_id`, `notification_message`, `sender`, show, `date`) VALUES (NULL, '$usr_id', 'Successful account upgrade. You are now a $type', 'Codeg Account Wizard', 1, CURDATE());
INSERT INTO usrs_acc_type (`usrs_usr_id`, `account_type_type_id`) VALUES ($usr_id, $type_id);
UPDATE `transaction` SET `order_status` = 'Completed' WHERE `usr_id` = $usr_id AND `purchase_type` = 'Account Upgrade' AND `order_status` = 'Pending' AND `item` = '$type Account';
【问题讨论】:
-
查找 INSERT INTO user_notifications (`id, id 缺少 1 个引号
标签: mysql codeigniter