[thelist] mysql error using select to update

Bob Meetin bobm at dottedi.biz
Tue Jan 13 18:06:18 CST 2009

Paul, Jack,

Yes this is at the MYSQL command prompt.  I tried:

mysql> set @attribs := select attribs from jos_content where id=119;  
--> fails with syntax error

so tried:

mysql> set @attribs := "select attribs from jos_content where id=119";

mysql> set @attribs := (select attribs from jos_content where id=119);

both respond with:  Query OK, 0 rows affected (0.00 sec)

the query outside of the variable is valid for id 119

I checked the variable by doing:

mysql> SHOW VARIABLES LIKE '%attrib%';
Empty set (0.00 sec)

I'm assuming failure here.
i'm doing something syntactically wrong?


More information about the thelist mailing list