【发布时间】:2018-02-19 01:03:09
【问题描述】:
我想编写一个查询,从表中删除记录并更新另一个记录。这是我的查询:
DELETE FROM borrowed_books a WHERE a.id = '$id'
AND
UPDATE books b SET b.nr_copies=b.nr_copies+1 where
b.id_book=a.id_book
控制台中的错误说:
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version
我正在使用 mySQL 和 XAMPP。
【问题讨论】: