Chapter 8: PDO - the Right Way to Access Databases in PHP
by Parham Doustdar
PDO is the acronym of PHP Data Objects. As the name implies, this extension gives you the ability to interact with your database through objects.
Why not mysql
and mysqli
?
The very valid question people ask when confronted by a new technology is simply, why should they upgrade? What does this new technology give them that is worth the effort of going through their entire application and converting everything to this new library, extension, or whatever?
It’s a very valid concern. We’ve written about this to some degree before, but let’s go through why we think it’s worth it to upgrade.
PDO is object-oriented
Let’s face it: PHP is rapidly growing, and it is moving toward ...
Get Better PHP Development 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.