RE: [PEAR] MDB - insert query
| From: | Christian Karlsen | Date: | Fri, 07 Mar 2003 16:56:13 +0000 |
| Subject: | RE: [PEAR] MDB - insert query | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-4091@lists.php.net to get a copy of this message | ||
On Fri, 07 Mar 2003 17:18:03 +0100, Lukas Smith wrote:
> this is what you will need to do however. Since MDB tries to give the
> same API for all supported databases it was decided to use the concept
> of sequences to generate unique id's.
>
Ok! thanks for the quick response
By the way, I think I've found a bug in currId() in pgsql.php.
code:
if (MDB::isError($result = $this->queryOne("SELECT last_value FROM $seqname")))
..
if (!is_int($result))
..
you should either cast the return value from queryOne to an integer
($result = (int) $this-> ...) or you should check for is_numeric() instead
of is_int().
I experienced that the return value was an integer in a string
--
Greetings,
Christian Karlsen