Re: DB, MDB2, PDO - Future of DB-Abstraction in PEAR

From: Date: Thu, 04 Aug 2005 00:01:15 +0000
Subject: Re: DB, MDB2, PDO - Future of DB-Abstraction in PEAR
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-39188@lists.php.net to get a copy of this message
Lukas Smith wrote:
Well limit is slightly more tricky, but atleast nextID() can best be handled inside the schema, this way you can get any popular database to produce auto increment like behaviour. This is exactly what the lastInsertId() method in PDO tries to facilitate.
do you think about this one: http://troels.arvin.dk/db/rdbms/#mix-identity ? So you'd prefere that about sequences? I'm not 100% sure how to implement it with PDO::lastInsertId(). An application should not know which database is used and which features are supported. Do all PDO-Drivers support: $pdo->exec("INSERT INTO table ..."); $last_id = $pdo->lastInsertId(); (if the db schema is correct...)? Or do some drivers need sequence-names passed to $pdo->lastInsertId()? If so, it would not be portable/DB independent code.
http://pecl.php.net/bugs/bug.php?id=4732 http://pecl.php.net/bugs/bug.php?id=4987
I am quite certain that both of these will be addressed.
great ;-) regards, Andreas

« previous php.pear.dev (#39188) next »