Additional Capabilities of PDO

Converting one application certainly doesn't tell the whole story about PDO, so let's have a look at some of the other capabilities of PDO. There are three PDO classes: PDO; the database or connection class, PDOStatement; and PDORow. By far the most interesting and unfamiliar class is the statement class, and this is where we'll concentrate our attention. We'll briefly discuss PDORow when we come to the fetchObject method of the statement class.

The PDO Class

So far in this book we've created our own connection class and used the SQLiteDatabase class—classes that have many similarities to PDO. With this experience, I needn't say a lot about the PDO class.

I've already mentioned the quote, setAttribute, and

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.