|
Posted by newbie on 07/20/07 20:41
On Jul 20, 1:39 pm, Sanders Kaufman <bu...@kaufman.net> wrote:
> newbie wrote:
> > Thanks for the answer. But I undersatnd mysql_insert_id() is to
> > 'Retrieves the ID generated for an AUTO_INCREMENT column by the
> > previous INSERT query.'. How to deal with the situation that multi-
> > users insert rows concurrently?
>
> That's only a problem if you use the SELECT method.
>
> If you use mysql_insert_id or (whatever that command is) it gets the
> last insert *on that connection*. So as long as two different users are
> using two different connections, you don't have to worry about getting
> back the wrong ID.
ah, thanks!
Navigation:
[Reply to this message]
|