List:General Discussion« Previous MessageNext Message »
From:Victor Subervi Date:December 27 2009 7:04pm
Subject:Re: last_insert_id
View as plain text  
On Sun, Dec 27, 2009 at 1:30 PM, Gary Smith <lists@stripped> wrote:

> Victor Subervi wrote:
>
>> On Sun, Dec 27, 2009 at 12:00 PM, Michael Dykman <mdykman@stripped>
>> wrote:
>>
>>
>>
>>> last_insert_id() returns the last id auto-incremented in *the current
>>> session*.  If you disconnect and reconnect, it can not be retrieved.
>>>
>>>
>>>
>>
>> Ahah! So how do I retrieve the last id inserted irrespective of
>> connection?
>>
>>
> Would max() work for you?


Ahah! No space! Got it. Thanks.
V

Thread
last_insert_idVictor Subervi27 Dec
  • Re: last_insert_idMattia Merzi27 Dec
    • Re: last_insert_idVictor Subervi27 Dec
      • Re: last_insert_idMichael Dykman27 Dec
        • Re: last_insert_idVictor Subervi27 Dec
          • Re: last_insert_idGary Smith27 Dec
            • Re: last_insert_idVictor Subervi27 Dec
            • Re: last_insert_idCarsten Pedersen27 Dec
  • Re: last_insert_idSteve Edberg27 Dec
    • Re: last_insert_idGary Smith27 Dec
      • Re: last_insert_idMark Goodge27 Dec