Re: Beginner query about mysql...
| From: | Janet Valade | Date: | Mon, 18 Feb 2002 05:40:22 +0000 |
| Subject: | Re: Beginner query about mysql... | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-17014@lists.php.net to get a copy of this message | ||
After you have inserted the record, use the statement;
$rowid = mysql_insert_id();
$rowid will contain the value inserted by the last insert command.
Janet
----- Original Message -----
From: "michele" <sson.mp@tiscali.it>
To: <php-db@lists.php.net>
Sent: Sunday, February 17, 2002 3:52 PM
Subject: [PHP-DB] Beginner query about mysql...
> I have a table with a ID field 'auto_increment',
> when i insert a record in the table,
> how can i know the value of the ID inserted by the mySQL?
> Thank's,
> Michele.
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>