Re: How to get the auto-incremented value?
| From: | Gareth Williams | Date: | Thu, 26 Feb 2004 16:14:48 +0000 |
| Subject: | Re: How to get the auto-incremented value? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-178947@lists.php.net to get a copy of this message | ||
The function mysql_insert_id() will return the correct value.
On 26 Feb 2004, at 17:10, Brian Dunning wrote:
When I write a record to a MySQL db with an auto-incremented key column, say it's called "id", what's the easy to retrieve that value? Do I have to run a query? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php