On Apr 12, 2005 1:37 AM, Siegfried Heintze <[EMAIL PROTECTED]> wrote: > Thanks, JP. > And will this work for multi-threaded, multi-user applications? > Siegfried
Yes: "The last ID that was generated is maintained in the server on a per-connection basis. This means the value the function returns to a given client is the most recent AUTO_INCREMENT value generated by that client. The value cannot be affected by other clients, even if they generate AUTO_INCREMENT values of their own. This behavior ensures that you can retrieve your own ID without concern for the activity of other clients, and without the need for locks or transactions." See <http://dev.mysql.com/doc/mysql/en/information-functions.html> and look for LAST_INSERT_ID(). JP -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]