[thelist] mysql error using select to update

Bob Meetin bobm at dottedi.biz
Mon Jan 12 12:40:35 CST 2009

This is Joomla, but I think that is immaterial:

update jos_content set attribs = (select attribs from jos_content where 
id=191) where id=180;

ERROR 1093 (HY000): You can't specify target table 'jos_content' for 
update in FROM clause

I am guessing this means that I cannot use the same table for both the 
select and update.  If so, what is a workaround?

Bob Meetin

More information about the thelist mailing list