David T. Ashley wrote:
I'm using PHP, and I sometimes INSERT new records in a table. MySQL assigns
a new autoincrement int field on each INSERT ... nothing surprising there.
It goes 1, 2, 3, etc.
What query can I use to find out what value this int autoincrement assigned
field was? I could of course SELECT based on what was just inserted, but
that seems inefficient.
Thanks for any help,
Dave.
LAST_INSERT_ID()
<http://dev.mysql.com/doc/refman/4.1/en/information-functions.html>
Michael
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]