----- Original Message ----- From: "David T. Ashley" <[EMAIL PROTECTED]>
To: <mysql@lists.mysql.com>
Sent: Saturday, April 22, 2006 12:53 AM
Subject: How to Find Most Recent Autoincrement Index Assigned???


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,


RTFM?

If you search the MySQL manual on "increment", you'll get several hits, one of which is "3.6.9 Using AUTO_INCREMENT". Here is the link:
http://dev.mysql.com/doc/refman/5.0/en/example-auto-increment.html

If you read that page, you should find your answer....

--
Rhino


--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.4.5/321 - Release Date: 21/04/2006


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to