Re: [PDO] PDO version 1 improvements

From: Date: Wed, 07 May 2008 13:18:03 +0000
Subject: Re: [PDO] PDO version 1 improvements
References: 1 2 3 4 5 6 7 8 9 10  Groups: php.pdo 
Request: Send a blank email to pdo+get-171@lists.php.net to get a copy of this message
2008/5/7 Ulf Wendel <ulf.wendel@phpdoc.de>: > Ulf Wendel schrieb: > > > > The course of PDO is not clear to me. PDO should not call itself a data > access abstraction layer if it aims to be more than that. Support for named > parameters is part of a SQL abstraction layer. Its strange for me to see > that a convenience feature like named parameters is a must and a - in my > eyes - basic and more important feature like lastInsertId() gets ignored. > > > > From the PHP manual: > > "PDO provides a data-access abstraction layer, which means that, regardless > of which database you're using, you use the same functions to issue queries > and fetch data. PDO does not provide a database abstraction; it doesn't > rewrite SQL or emulate missing features. You should use a full-blown > abstraction layer if you need that facility.", > http://de.php.net/manual/en/intro.pdo.php > > Aha - and why does it have a parser for emulating prepared statements? Well, since you like quoting from the manual, if you read a little bit further on, you can find the answer to your question: "Prepared statements are so useful that they are the only feature that PDO will emulate for drivers that don't support them. This ensures that you will be able to use the same data access paradigm regardless of the capabilities of the database. " http://php.net/manual/en/pdo.prepared-statements.php -- Dan Scott Laurentian University

« previous php.pdo (#171) next »