Re: [PDO] PDO version 1 improvements

[email protected] ("Dan Scott") Wed, 7 May 2008 09:18:03 -0400
Newsgroups php.pdo
Message-ID <[email protected]>
2008/5/7 Ulf Wendel <[email protected]>:
> 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