The Register® — Biting the hand that feeds IT

Feeds

Post: PDO is a very good thing

Lucas Thomas

PDO is a very good thing 

In Spread your database connections with PHP PDO

Thumb Up

Not only does it help you with standard DB functions (connecting, queries, inserts, updates, etc.), it helps you develop quickly for multiple database systems.

I agree, the test case given in the article about using one DB in a test environment and another in production could have been stated another way. However, there are many companies the develop web applications for many clients, all of which use different DB systems. In order to get a good time-to-market implementation, you'll need a good DB abstraction layer. I've used Zend_Db in Zend's framework quite a bit. It's very efficient and easy to implement. http://framework.zend.com/manual/en/zend.db.html.

Need an ORM? Doctrine is a very good choice. http://www.phpdoctrine.org/

Not only that, IBM and Oracle have PDO built into their DB systems. IBM has built in connection pooling in their DB2v9 system that has been optimized for PHP. Oracle has done the same with their 11g DB.

Needless to say, PDO is a VERY good thing.

Forums

Password reminder