UPDATE newsreactions
SET newsreactions.enabled = '0'
FROM newsreactions
INNER JOIN users ON newsreactions.memberId = users.id
WHERE users.active = '0' AND users.comment LIKE '%spam%'
が何らかの理由で、私は構文エラーを取得しています。ここでSQL更新が参加し、
1064 - 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 'FROM newsreactions INNER JOIN users ON newsreactions.memberId = users.id WHERE u' at line 3
は、しかし、それを把握することはできません。 update
とset
をselect
に置き換えると正常に動作します。
。 –
MySQLマルチテーブルのUPDATE文の構文は次のとおりです。http://dev.mysql.com/doc/refman/5.6/en/update.html – spencer7593