Re: mysql thing
| From: | hypnos | Date: | Tue, 28 Dec 1999 20:58:33 +0000 |
| Subject: | Re: mysql thing | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-8619@lists.php.net to get a copy of this message | ||
On Tue, 28 Dec 1999, David Moreno S. wrote:
> I mean i'm doing a insert into a table that has a auto_increment column, how
> can i insert and get the value of that column for the new record?
From 'Docs/manual.txt':
*mysql_insert_id()* Returns the ID generated for an `AUTO_INCREMENT'
column by the previous query.
The last ID that was generated is maintained in the server on a
per-connection basis. It will not be changed by another client.
It will not even be changed if you update another `AUTO_INCREMENT'
column with a non-magic value (that is, a value that is not `NULL'
and not `0').
------------------------------------------------------
hypnos <mailto:hypnos@m-net.arbornet.org>