我有这个查询
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
工作正常?