Benjamin, > Yes, that is the documented behaviour: > http://www.mysql.com/doc/en/Miscellaneous_functions.html
(If you insert many rows at the same time with an insert statement, LAST_INSERT_ID() returns the value for the first inserted row.) Gee, I just copied this sentence into my new (German) book (short reference of MySQL) about two weeks ago <blush> Regards, -- Stefan Hinz <[EMAIL PROTECTED]> Geschäftsführer / CEO iConnect GmbH <http://iConnect.de> Heesestr. 6, 12169 Berlin (Germany) Tel: +49 30 7970948-0 Fax: +49 30 7970948-3 ----- Original Message ----- From: "Benjamin Pflugmann" <[EMAIL PROTECTED]> To: "Stefan Hinz, iConnect (Berlin)" <[EMAIL PROTECTED]> Cc: "Octavian Rasnita" <[EMAIL PROTECTED]>; "MySQL" <[EMAIL PROTECTED]> Sent: Wednesday, January 22, 2003 7:29 PM Subject: Re: Which is the difference? > Hello. > > On Wed 2003-01-22 at 08:53:23 +0100, [EMAIL PROTECTED] wrote: > > > > seems like LAST_INSERT_ID() will not always return the correct value. If > > you use ANSI-SQL INSERT, the function works fine. If you use MySQL > > extended INSERT (i.e. with more than one record per insert statement), > > the function will return the ID of the _first_ record inserted with an > > extended INSERT. > > Yes, that is the documented behaviour: > http://www.mysql.com/doc/en/Miscellaneous_functions.html > > Regards, > > Benjamin. > > > -- > [EMAIL PROTECTED] --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php