Chapter 16. Using PDO

Databases are important to any dynamic website. That's why we've had a lot to say about them in this book (too much, some of you may be thinking). However, PHP Data Objects (PDO) can't be ignored because they are packaged with PHP version 5.1 and higher, and they are "something many of the PHP dev team would like to see as the recommended API for database work."[*]

[*] www.zend.com/zend/week/week207.php#Heading6. (Accessed April 14, 2006.)

PDO is a data-access abstraction layer that aims for uniform access to any database. That's a pretty good reason for looking at PDO, but what interests us in particular is that the PDO interface is entirely object-oriented (OO). It makes extensive use of the OO improvements to PHP 5. In ...

Get Object-Oriented PHP now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.