Scott Haneda wrote:

So, I need to basically:
SELECT iamge_title, image_filename, image_url, image_width, image_height
from images where user_id = '123';

Then, take that result and insert all those rows in the same table, setting
type='2' and added=NOW()

I think I need to do a subselect, the docs are really sparse on examples,
and I don't see how to change the 2 values I need to change.

   Why can't you simply UPDATE the record?

   mysql> update images set type='2' and added=NOW() where user_id='123';

--
W | I haven't lost my mind; it's backed up on tape somewhere.
 +--------------------------------------------------------------------
 Ashley M. Kirchner <mailto:[EMAIL PROTECTED]>   .   303.442.6410 x130
 IT Director / SysAdmin / WebSmith             .     800.441.3873 x130
 Photo Craft Laboratories, Inc.            .     3550 Arapahoe Ave. #6
 http://www.pcraft.com ..... .  .    .       Boulder, CO 80303, U.S.A.




-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to