News Feed
Sections




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

NetTuts.com:
PHP Database Access Are You Doing It Correctly?
June 04, 2012 @ 13:33:54

In this new tutorial on NetTuts.com, they talk about one of the more fundamental connection types you can do in PHP - database connections. They want to be sure you're "doing it correctly" via PHP's PDO API.

We've covered PHP's PDO API a couple of times here on Nettuts+, but, generally, those articles focused more on the theory, and less on the application. This article will fix that! To put it plainly, if you're still using PHP's old mysql API to connect to your databases, read on!

They compare the three main methods for connecting to a MySQL database - mysql, mysqli and PDO - and how a typical mysql/mysqli codebase can be refactored to use PDO. They show examples of connections, error handling, fetching data, using prepared statements and snippets of code for CRUD (Create, Read, Update, Delete) handling.

Be sure and check out the comments - there's some great tips there too!

0 comments voice your opinion now!
mysql pdo tutorial connection refactor


blog comments powered by Disqus

Similar Posts

PHPMaster.com: An Introduction to Ctype Functions

Zend Developer Zone: Migrating applications from PHP 4 to Zend Core 2.5 w/support for IBM Informix

Rob Allen: Setting up PHP & MySQL on OS X 10.8 Mountain Lion

PHPBuiilder.com: Using Get and Post Methodology in AJAX Applications

NETTUTS.com: Introducing WordPress 3 Custom Taxonomies


Community Events





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


release code series configure threedevsandamaybe bugfix list api install laravel application interview language introduction community wordpress framework podcast developer library

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