MySQL sub query

Posted by Juddling on Stack Overflow See other posts from Stack Overflow or by Juddling
Published on 2010-05-09T13:37:28Z Indexed on 2010/05/09 13:48 UTC
Read the original article Hit count: 248

Filed under:
|
UPDATE members SET money=money+100 WHERE username IN (SELECT username FROM forum);

Lets say I wanted to give each of my members 100 money for each post in my forum. This query works but if one member has posted more than once, they only get 100. Could someone correct this query please?

© Stack Overflow or respective owner

Related posts about mysql

Related posts about subqueries