O'Reilly logo

Object-Oriented Programming with PHP5 by Hasin Hayder

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 7. Database in an OOP Way

Besides regular improvements in the OOP, PHP5 also introduces many new libraries to seamlessly work with database in an OOP way. These libraries provide you with improved performance, sometimes improved security features, and of course a whole lot of methods to interact with new features provided by the database server.

In this chapter we will discuss MySQL improved API, which is known as MySQLi. Take a look at basic PDO (well, not detailed because PDO is so huge that it is possible to write a whole book just on it), ADOdb, and PEAR::MDB2. In the mean time we will also take a look at Active Record pattern in PHP using ADOdb's active. One thing to note here is that we are not focusing on how to do general database ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required