Is there a way with Pear DB to return the ID of a newly INSERTED record?
+2
A:
Yes, last_insert_id() is the answer to your question. It's session specific, so you don't have to worry if the id returned is the id from another row inserted by another user. You will be sure it's the one you need.
Vasileios Lourdas
2010-09-19 19:06:22
+1
A:
Not really answering your question as such but the DB package has been deprecated for a very long time - you are better off to be using the MDB2 package which is actively maintained - the latest release was last month.
kguest
2010-09-19 19:59:35