[thelist] mysql error using select to update - resolved X 2

Bob Meetin bobm at dottedi.biz
Fri Jan 16 08:38:39 CST 2009

Thanks to all - this works perfecty. 

jft wrote:
> Bob,
> The idea I intended to convey earlier is different to the idea you received.
> The update you want to do can be done in one single-line statement, it does not need a temporary table at all.
>>  In this case we will assume 118 to be the ID we want to mimic
>>  and 110 as the ID of the content item we want to update:
> Try this:
>    update jos_content a, jos_content b set a.attribs = b.attribs where a.id = 110 and b.id = 118;
> HTH,
> John

Bob Meetin

Hook up with me on Twitter, Facebook, LinkedIn, Plaxo Pulse and Bebo
or catch my blog at www.dottedi.biz/blog.php

Standards - you gotta love em - there are so many to choose from!

More information about the thelist mailing list