Lester Caine wrote:

The main thing I see there is 'raw' SQL. Loading the variables directly into the script, rather than simply binding them as params. I have yet to work out a way of converting some of my dynamically generated SQL into a format that will work with PDO - on any database. I've only ever used ADOdb and that handles ALL of the parameterizing of things transparently.

I have no clue what type of dynamically generated SQL you are talking about. Are you talking about being able to dynamically stick identifiers into placeholders? This is simply not possible if you are using native prepared statements. If you emulate them, yes you can, but then you can might as well use sprintf() with quote() (maybe with a wrapper).

The other problem of cause is length of table and field names and reserved words. Adding Oracle and MsSQL to the mix, working with raw upper case table and field names and 31 character name limit introduces a few extra things to consider over and above just adding PDO to Drupal ;)

PDO handles some of those, but as said tons of times before, its not an abstraction layer, its an API unifier. There are PDO based layers like Doctrine, that give you all the convinience of ADODB (and more ..). They do however require that the underlying PDO driver is solid.

At any rate .. why bother with PDO when there are "native" extensions? The point of PDO was not only end user focused, it was also the idea to one day make it less effort to add new features to all the RDBMS extensions (for example unicode .. that being said I keep hearing that PDO HEAD is totally out of sync). It also makes it a lot easier to add a new RDBMS extension.

Now if we stick with maintaining the current non PDO extensions, then you must realize that we are maintaining a lot of redundant code, which is based on one of the oldest extensions (ext/mysql). Since we do not have infinite development resources, it would be for the better of any of the supported RDBMS if it would get its PDO driver up to the same level as the old extension. As more and more of our userbase is moving to PHP5 this hopefully will become more and more interesting.

regards,
Lukas

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to