WHERE id IN doesn't work in UPDATE
Posted
by Donator
on Stack Overflow
See other posts from Stack Overflow
or by Donator
Published on 2010-05-01T17:38:39Z
Indexed on
2010/05/01
17:47 UTC
Read the original article
Hit count: 226
UPDATE statistics
'
SET money = money + '$money'
WHERE member_id IN
((SELECT member_id FROM races WHERE l_id = '$mem_id'), $other_id)
What's wrong with that? I want to retrieve all member_ids from races and also include to member_id $other_id. Without $other_id it works.
By the way, it gives me "Subquery returns more than 1 row" error.
© Stack Overflow or respective owner