News Feed
Sections




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

Chad Lung's Blog:
A quick intro to using PHP PDO with MySQL
March 17, 2011 @ 09:52:55

Chad Lung has posted an introduction to PDO, PHP Data Objects, in a simple PHP script:

PHP PDO (PHP Data Objects) ship with PHP 5.1 and above and is very easy to work with. Today I'm going to show you one way of performing CRUD actions on a MySQL database using PDO. Keep in mind what I'll show you is only one way of doing things and just a fraction of what PDO can do.

He shows how to connect it to your MySQL database (via the connect string) and, based on his sample "pdo-demo.users" table, use prepared statements to insert and select data into/out of the table. There's a full code listing at the end showing a comprehensive view of each of the types - select, insert, update and delete.

0 comments voice your opinion now!
pdo mysql tutorial introduction phpdataobjects


blog comments powered by Disqus

Similar Posts

Jason Gilmore's Blog: How I Learned to Stop Worrying and Love Zend_Form

Wokay.com: 12+ Tutorials for creating PHP5 MVC Framework

PHPBuilder.com: Beginning PHP: One Goal at a Time

Eran Galperin's Blog: Profiling queries with Zend_Db and optimizing them by hand

WebReferece.com: How to Use the HTTP Protocol


Community Events





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


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

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