|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
You don't need a fax machine to get faxes. Get a fax-to-email fax number from CallWave. Try it free.
|
|
#1
|
|||
|
|||
|
Retrieve next record id ?
OK, I know it's probably been asked many times already, but could someone explain how I retrieve the next record id in a table with an autoincremented field ?
I want to create a new record, and as soon as it's created, inform the author of the id of the record they just created. Normally I'd select the last record created, but that brings with it the problem of distinguishing between records created simultaneously in high traffic sites. Any thoughts or suggestions ? Thanks! |
|
#2
|
|||
|
|||
|
Kiwi,
You want to use the "mysql_insert_id()" function to retrieve the last ID. ex: PHP Code:
HTH.
__________________
____________________________________________ Developer Shed Weekly Writer | DevArticles Forum Moderator Build Your Own KlipFolio Klip With PHP FrankManno.com - Under Construction Design Interactive Group - Under Construction |
|
#3
|
|||
|
|||
|
Thanks a mill!
Gee, quick and easy when you know how!
![]() Thanks for that Frankie, much appreciated. Will. |
![]() |
| Viewing: Dev Articles Community Forums > Databases > General SQL Development > Retrieve next record id ? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|