DB class, MySQL and nextId()
| From: | Chris Boget | Date: | Thu, 15 Apr 2004 20:46:52 +0000 |
| Subject: | DB class, MySQL and nextId() | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-11880@lists.php.net to get a copy of this message | ||
I'm curious what the point is of nextId() in the mysql driver class for
DB? Unless I'm (*really*) missing something, it's implementation is
utterly worthless for INSERT queries into tables that already have
data. What nextId() returns is the last_insert_id() for the sequence
you create not the last_insert_id() for the table that you are actually
inserting data to. So what's the point?
And how are you supposed to get the last_insert_id() for the table
you are inserting data to using the class? Or are you supposed to do
that on your own?
thnx,
Chris