mysql_insert_id() is updated after INSERT and UPDATE statements that generate an AUTO_INCREMENT value or that set a column value to LAST_INSERT_ID(expr).
If the record did not exist and UPDATE performed as INSERT, then I would theoretically have no problem. Hower, since the record that I'm updating already exists, the AUTO_INCREMENT value also already exists and that value is not being re-generated. Therefore, the value that mysql_insert_id() is returning is zero. Is there a similar way to capture the id of the record that is being updated?
-Mike
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]