PHP Data Objects
Erik Wurzer gibt für nettuts+ einen kurzen Einblick wie PHP Data Objects (PDO) funktionieren und warum man diese Methode für den Zugriff auf Datenbanken via PHP nutzen sollte.
Neben der Datenbank Abstraktion bietet PDO noch einige andere nette Features, z.B. die PDO::FETCH_CLASS Methode:
When you use FETCH_CLASS, the properties of your object are set BEFORE the constructor is called. Read that again, it’s important. If properties matching the column names don’t exist, those properties will be created (as public) for you.
This means if your data needs any transformation after it comes out of the database, it can be done automatically by your object as each object is created.
As an example, imagine a situation where the address needs to be partially obscured for each record. We could do this by operating on that property in the constructor.

