Le samedi 10 octobre 2009 à 19:43 +0100, Lester Caine a écrit : [...] > > It is the case for MySQL and Oracle...so for your mind, we don't have to > > make this option available ? I disagree because PDO want make that PHP > > codes support many Databases and if I want to get this notices on MySQL, > > I can use "SHOW WARNING" but, if my apps is used on PostgreSQL, my query > > will fail ! If I can use PDO::noticeInfo in MySQL and in PostgreSQL, it > > will be great. :-) > > Samuel - the most important thing to note here is that MOST additional > MySQL SQL will fail on Postgres and many other database. PDO does > nothing about the SQL and so while a LOT of projects have switched TO > PDO, the result is LESS compatibility at the SQL level. Two of the > projects I work with have made a switch that now makes them unusable > with Firebird and I've had to switch my own builds BACK to ADOdb simply > to restore the SQL compatibility. People are using PDO, but only with a > single database! There is no consensus yet on making the SQL transparent > to each driver.
I agree that for high SQL level, using a simple connexion abstraction isn't sufficient. But PDO is in many cases like a Database abstraction because each Databases supports minimal SQL syntax. For notices, it IS different because they can be wanted by anybody whose codes use PDO... From the novice to the high SQL experience using PDO instead of PHP basic drivers. > > And we have to know that these additional requests will be executed only > > if PDO::ATTR_LOG_NOTICES is turned to 1 ! So user want them... ;-) > > But the actual notices returned WILL be different for each database and > have to be handled separately in each case anyway? Get notices is different on each Database, yeah. That's why we have to develop a basic function which returns notices raised by the Database PDO's driver. ;-) -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php