Re: udpate / subquery

2005-05-28 Thread Chris
Syntax looks fine to me. Sub-queries are only supported in 4.1.x+ , I'm guessing that's your problem. Chris Lieven De Keyzer wrote: UPDATE account SET role_id = (SELECT role_id FROM role WHERE rolename = "admin") WHERE username = "test" This gives me an: ERROR 1064 (0): You have an error

udpate / subquery

2005-05-28 Thread Lieven De Keyzer
UPDATE account SET role_id = (SELECT role_id FROM role WHERE rolename = "admin") WHERE username = "test" This gives me an: ERROR 1064 (0): 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 'SELECT role_id f