Page 1 of 1

Finding auto-increment value after inserting

Posted: Mon Sep 22, 2003 4:07 am
by Dave_will
I'm sure I've seen how do do this but forgotten where.

How can you find the value of an auto-increment field after inserting a record without accessing the DB?

Thanks

Whoops - Found answer in a previous posting

Posted: Mon Sep 22, 2003 4:12 am
by Dave_will
Original search didn't find answer due to my misstype... Sorrey all

Posted: Mon Sep 22, 2003 5:15 am
by twigletmac
For those who follow:

In PHP: mysql_insert_id()
In MySQL: LAST_INSERT_ID()

Mac