> One should always use the > LAST_INSERT_ID() or after an insert, select max(id) from myTable.
Select max(id) from myTable should never be used to get the last insert id. On a high traffic table you are not guaranteed it will be the ID for the record you just inserted, another could have been inserted between the two queries. Where as last_insert_id is per connection, so you don't have to worry about getting someone else's ID. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]