我有这个查询
DELETE c FROM review_comments AS c
LEFT JOIN users AS u
ON u.user_id = c.user_id
WHERE c.comment = '{$comment}'
AND u.username = '{$user}'
LIMIT 1;
在我删除LIMIT 1
;
它说: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 'LIMIT 1' at line 6
在这种情况下,这是LIMIT 1
的错误用法吗?我有一个相同的查询没有连接表,LIMIT 1
工作得很好?
答案 0 :(得分:4)
我认为LIMIT不能用于MySQL中的多表引用DELETE语句。