With the introduction of PHP 5, the PHP Data Object was introduced as core functionality. PHP 5.1 turned on a minimum level of support for SQLite, by default, and PDO supports most of the major database engines. PDO offers a number of enhancements and improvements over the various database libraries (e.g. mysql_*, mysqli_*, pg_*), the biggest one being consistency. Still, the high level of code that involves direct use of the various database libraries means that PDO still isn’t as widely accepted as it should be.
This primer will show the various uses of PDO, and outline some of the benefits.
Monday, October 5th, 2009 @ 1:00 am |
Comment (4) |
Categories: Best Practices, System Architecture, PHP 5
Tags: PHP 5, PDO, database