Adding Records & Capture The New Record ID
| From: | revDAVE | Date: | Sat, 07 Feb 2009 19:33:34 +0000 |
| Subject: | Adding Records & Capture The New Record ID | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-287907@lists.php.net to get a copy of this message | ||
Newbie question...
Hi folks,
Adding records & capture the new record ID:
In the past, if I added a new record from a form in a phonebook file as an
example, I would use a web form to fill out the info, and then add and
invisible text item that stored a random number in one of the unused
database fields.
Then, after I inserted the record - I would do a quick query that would
retrieve the record ID by searching for the random number
Q: is there a better way to retrieve the record ID from the newly added
record?
--
Thanks - RevDave
Cool @ hosting4days . com
[db-lists 09]