我已尝试修复查询,但仍然无效
这是错误:
错误号码:1064
您的SQL语法有错误;查看与MySQL服务器版本对应的手册,以便在第3行“INSERT INTO user_notifications(
id,
usr_id,
notification_message,
sender`”附近使用正确的语法DELETE FROM account_requests WHERE
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
交易{{1} } order_statusSET
usr_id= 'Completed' WHERE
purchase_type= AND
order_status= 'Account Upgrade' AND
item` ='Tutor Account';文件名:C:\ Users \ Supremekhaoz \ Downloads \ Dropbox \ htdocs \ codeg \ system \ database \ DB_driver.php
行号:330
查询:
= 'Pending' AND
答案 0 :(得分:2)
如果您使用codeigniter,为什么不尝试活动记录
$data = array(
'id' => NULL ,
'usr_id' => $usr_id ,
'notification_message' => 'Successful account upgrade. You are now a '.$type,
'sender' => 'Codeg Account Wizard',
'show' => 1,
'date' => time()
);
$this->db->insert('user_notifications', $data);
并检查您的$usr_id
是否有值,我认为它没有值