Re: How to get the auto-incremented value?
| From: | John Nichel | Date: | Mon, 01 Mar 2004 13:23:05 +0000 |
| Subject: | Re: How to get the auto-incremented value? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-179163@lists.php.net to get a copy of this message | ||
Angelo Zanetti wrote:
run a query: select query from table order by id desc hope this helps
-----Original Message----- From: Brian Dunning [mailto:brian@briandunning.com] Sent: Thursday, February 26, 2004 6:10 PM To: php-general@lists.php.net Subject: [PHP] How to get the auto-incremented value? 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?http://www.php.net/manual/en/function.mysql-insert-id.php -- By-Tor.com It's all about the Rush http://www.by-tor.com