RE: [PHP] PEAR DB Questions
| From: | Jack Dempsey | Date: | Wed, 26 Sep 2001 19:20:09 +0000 |
| Subject: | RE: [PHP] PEAR DB Questions | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-68909@lists.php.net to get a copy of this message | ||
don't know about pear, but in case you can't do it, there's a mysql version-
LAST_INSERT_ID()
like this:
mysql> select last_insert_id();
+------------------+
| last_insert_id() |
+------------------+
| 262 |
+------------------+
1 row in set (0.04 sec)
-jack
-----Original Message-----
From: Matthew Walker [mailto:matt@mountaintopherbs.com]
Sent: Wednesday, September 26, 2001 2:24 PM
To: php-general@lists.php.net
Subject: [PHP] PEAR DB Questions
I've got the docs you all mentioned in response to my earlier questions.
Thanks a ton! They were almost exactly what I needed.
There's only one thing that I can't figure out how to do with the
module. In PHP, there's a function 'mysql_insert_id()'. It returns the
Autoincriment ID of the last insert you performed. How do I get that
information with the PEAR DB module?
--
Matthew Walker
Ecommerce Project Manager
Mountain Top Herbs
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.281 / Virus Database: 149 - Release Date: 9/18/2001