News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Brandon Savage's Blog:
Accessing Databases with PDO A Primer
October 05, 2009 @ 11:56:37

Brandon Savage has posted the next part in his "Beginner Pattern" series sharing some of the basics of PHP with his readers. In this new article he looks at the PDO functionality and how it can be used to connect to and read from a MySQL database.

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.

He gives two bits of example code - one showing a transaction and the other a normal MySQL connection without any kind transaction wrapper around it as an example of "the old way" to do things.

1 comment voice your opinion now!
pdo beginner example database


blog comments powered by Disqus

Similar Posts

Chris Hartjes' Blog: The Devilís In The Details (or, Handling Sequences in Postgres in CakePHP)

DZone.com: Zend_Validate for the win

Developer Tutorials: Easy PDF Generation in PHP

O\'Reilly: Designing a database-driven PHP App? Don\'t Forget the Data!!

Zend Developer Zone: Lifting the Skirt on Zend Framework 1.5 - Zend_Form


Community Events





Don't see your event here?
Let us know!


language series install configure interview refactor podcast community framework release code laravel wordpress unittest introduction opinion threedevsandamaybe developer testing list

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework