'on duplicate key update ' and 'last_insert_id ' 2006-06-30 - By David Hillman
Back On Jun 30, 2006, at 10:44 AM, Rob Desbois wrote: > That leaves me with ON DUPLICATE KEY UPDATE. It's not amazingly > helpful as you have to provide a column to update - however I can > just say e.g. > ON DUPLICATE KEY UPDATE id=id > The problem with this is that if I then do "SELECT LAST_INSERT_ID > ();" then I don't get the id of the 'updated' table, I get the > *next* auto increment value. > > Is the last bit a bug?
Yes, http://bugs.mysql.com/bug.php?id=19243
-- David Hillman LiveText, Inc 1.866.LiveText x235
|
|