UPDATE and JOIN causing a Syntax Error in MySQL
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
That's my query and I'm getting an error:
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
The syntax looks right to me, but clearly I'm missing something. Any ideas
what?
No comments:
Post a Comment