News Feed
Sections




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

PHPMaster.com:
Avoid the Original MySQL Extension, Part 2
February 25, 2013 @ 13:40:09

PHPMaster.com has posted the second part of their "avoid the original MySQL extension" tutorial series (part one is here). In this new part, they share more about another alternative - the PDO extension.

The PDO extension supports twelve drivers, enabling it to connect to a variety of relational databases without the developer having to learn a number of different APIs. It does this by abstracting the database interaction calls behind a common interface, enabling the developer to utilize a consistent interface for different databases. This of course gives it a major advantage over both the MySQL and MySQLi extensions who are limited to only one database.

Included in the post are examples of some of the basics - connecting, executing queries, getting the results - as well as more compelx things like binding parameters and transaction support. There's also a bit about changing the default behavior of the PDO object through config options. He finishes off the article talking some about some of the issues that could come from using an abstraction layer like this and the need to still write good, compatible SQL depending on the database.

0 comments voice your opinion now!
mysql extension avoid pdo tutorial abstraction


blog comments powered by Disqus

Similar Posts

Juozas Kaziukenas' Blog: How to use external libraries in PHP?

Padraic Brady's Blog: ext/snarl: PHP interface to the Windows Snarl Notification Tool API

LaughingMeme.com: Looking at PHP5ís DateTime and DateTimeZone

PHPMaster.com: Array Operators in PHP: Interesting but Less Spoken

Community News: PHPNW 2012 Tutorial Day Sessions


Community Events





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


list community introduction framework api deployment interview voicesoftheelephpant laravel symfony podcast bugfix release library language zendserver tips series conference developer

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