RE: [PEAR] db_insert_id() not working
| From: | LIMBOURG Arnaud | Date: | Mon, 25 Feb 2002 15:05:01 +0000 |
| Subject: | RE: [PEAR] db_insert_id() not working | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-903@lists.php.net to get a copy of this message | ||
PEAR DB is a unified API, thus, particular functions like mysql_insert_id
are not to be used directly.
Do a Query like that "SELECT LAST_INSERT_ID()" to get the expected result.
>
> I'm can't seem to get mysql_insert_id() to work with the Pear
> library. I'm using auto_increment on the ID row and a simple
> $ID = mysql_insert_id() to get last id.
>
> Why would the pear lib prevent mysql_insert_id from working?
>
> =======================
> Ron Dyck
> WebbTech
> www.webbtech.net
> rhd@webbtech.net
>