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