Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get next ID number.

Status
Not open for further replies.

Sleidia

Technical User
May 4, 2001
1,284
FR
Good Morning!

Does anyone know if it is possible to retrieve the new
auto-incremented ID number upon creation of a new
record?

More precisely:

My code INSERTS a new record and upload a gif file on the
server at the same time. I am trying to use the new ID number as the file name.
But I can't get this number before or while it is created.

Getting the last record's ID number before adding the new record won't work when records have been deleted previously.

Then, does anyone know the way to "see the future" and get this damned number?

Thanks a lot for your help!



 
Thank you very very much Piti.

I've been searching through the documentation many times
before but couldn't find this. I wish this documentation
is as well aranged as the PHP one found at php.net.

Have a good day.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top