> COk I was thinking that you had to tell LAST_INSERT_ID the table you
wanted
> to get the last insert id from.  What if you run a web site and you have
10
> tables in a database, how can you tell what the last insert id of table 6
> was?

As I understand it, LAST_INSERT_ID is connection based, not table based.
It gives you the last id generated by any update using that connection,
regardless of the table upon which the insert was perfomed, but also
independent of any updates which may be being performed by other
connections.

     Alec

mysql, database



---------------------------------------------------------------------
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

Reply via email to