how to get id from table I just inserted into
| From: | Pablo Oliva | Date: | Thu, 10 Oct 2002 07:37:27 +0000 |
| Subject: | how to get id from table I just inserted into | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-119501@lists.php.net to get a copy of this message | ||
I have a mysql db with a particular table that I am inserting into.
This table has an id column that auto-increments. Is it possible to get
the id of the row that I just inserted into, without re-querying???
The problem that I have is that the data being inserted will be
identical for several rows, and hence there is no way to assure that
when I query with certain parameters that a unique row, the row that I
just inserted, will be returned. The only way that I can think of doing
this is by creating a timestamp as an identifying piece. Am I making
any sense?