Posted by Sanders Kaufman on 07/20/07 22:21
Michael Fesser wrote:
> .oO(Sanders Kaufman)
>>If you use mysql_insert_id or (whatever that command is) it gets the
>>last insert *on that connection*.
>
> So does LAST_INSERT_ID(). The last auto-generated ID is maintained by
> the server on a per-connection basis. It doesn't matter if you use a
> SELECT statement or an API call to retrieve it.
Wow.
I coulda saved myself a lot of trouble a long time ago if I hadn't
learned that wrong... and taught it wrong.
Navigation:
[Reply to this message]
|