UPDATE default_weekly_stats s
INNER JOIN default_profiles p
ON p.user_id = s.user_id
WHERE (default_profiles.opid = 0 OR default_profiles.opid IS NULL)
AND s.week = `1`
AND s.correct_picks = `4`
SET s.rank = 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 'WHERE (default_profiles.opid = 0 OR default_profiles.opid IS NULL) AND s.week = ' at line 1
语法对我来说是正确的,但显然我遗漏了一些东西。有什么想法吗?