List:General Discussion« Previous MessageNext Message »
From:Michael Widenius Date:June 3 1999 4:16am
Subject:Re: mysql_insert_id()
View as plain text  
Hi!

>>>>> "Benjamin" == Benjamin Pflugmann <philemon@stripped> writes:

Benjamin> Hi.
Benjamin> Without looking at the source, it sounds to me as if the server
Benjamin> sends/updates the value of mysql_insert_id() only if it was changed on
Benjamin> the server.

<cut>

Yes, this is right;  The client side 'mysql_insert_id' is updated for
each query and set to 0 if you didn't use an insert statement with a
auto_increment column.
The server side LAST_INSERT_ID() is only changed when on updates a
auto_increment column() or executes LAST_INSERT_ID(value).

Regards,
Monty
Thread
mysql_insert_id()Matthias Pigulla1 Jun
  • Re: mysql_insert_id()Paul DuBois1 Jun
    • Re: mysql_insert_id()Matthias Pigulla3 Jun
      • Re: mysql_insert_id()Paul DuBois3 Jun
    • Re: mysql_insert_id()Jim Faucette3 Jun
    • Re: mysql_insert_id()Matthias Pigulla3 Jun
      • Re: mysql_insert_id()Benjamin Pflugmann3 Jun
        • Re: mysql_insert_id()Michael Widenius3 Jun
          • Re: mysql_insert_id()Paul DuBois3 Jun
    • Re: mysql_insert_id()Matthias Pigulla3 Jun
    • Re: mysql_insert_id()Matthias Pigulla3 Jun
      • Re: mysql_insert_id()Michael Widenius3 Jun