PHP
  Home arrow PHP arrow Handling Result Sets and More with PDO Objects in PHP 5
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
VPS Hosting  
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid  
Request Media Kit
Contact Us  
Site Map  
Privacy Policy  
Support  
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
PHP

Handling Result Sets and More with PDO Objects in PHP 5
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 5
    2007-06-04


    Table of Contents:
  • Handling Result Sets and More with PDO Objects in PHP 5
  • Preparing queries and fetching database rows
  • Fetching database rows and columns
  • Counting affected rows and columns

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article

     
     
    ADVERTISEMENT


    Handling Result Sets and More with PDO Objects in PHP 5
    ( Page 1 of 4 )

    Building PHP applications that interact with different database systems can be a daunting task, especially from a developer's point of view. To tackle this issue with minor hassles, PHP 5.1 comes bundled with a powerful extension called PDO (short for PHP Data Objects), a library that definitely takes database abstraction to the ultimate level.

    Introduction

    Welcome to the second installment of the series that began with "Using PDO objects in PHP 5." In three approachable tutorials, this series walks you through the implementation of the most important features offered by the PDO extension, and complements its theoretical aspects with concrete examples. In this way you will be able to start quickly using it in your own PHP applications.

    Stepping back for a moment to the first article of the series, it's quite probable that you'll recall how this educational journey began. In simple terms, I started explaining some basic tasks that can be performed with the PDO extension, such as opening and closing a connection to diverse database systems (MySQL, Oracle, MS SQL, etc.), in addition to running queries against a selected database and handling PDO exceptions.

    Also, it's important to notice here that this PHP library lets you perform all the tasks mentioned above by using an object-oriented notation. This means that if you use this paradigm on a frequent basis when developing your PHP programs, you should take it for granted that you'll feel really comfortable implementing most of its features.

    All in all, at this point you hopefully learned how to use some basic methods included with this PHP extension, but logically you may want to learn a few additional ones, so you can have a more polished picture of the overall functionality of the library in question.

    Thus, keeping this in mind, over the course of this second tutorial of the series, I'm going to show you how to use the PDO extension to handle different database result sets in all sort of clever ways, in addition to performing some common tasks, like counting rows and columns as well.

    Are you ready to take the next step in this instructive journey? Okay, let's begin now!



     
     
    >>> More PHP Articles          >>> More By Alejandro Gervasio
     

       

    PHP ARTICLES

    - Building Dynamic Queries with Chainable Meth...
    - PHP Encryption and Decryption Methods
    - Building a MySQL Abstraction Class with Meth...
    - Completing a Sample String Processor with Me...
    - Mastering WHILE Loops for PHP and MySQL
    - Method Chaining: Adding More Methods to the ...
    - Method Chaining in PHP 5
    - The Role of Interfaces in Applying the Depen...
    - Dependency Injection: Using a Setter Method ...
    - Using a Model Class with the Dependency Inje...
    - Injecting Objects Using Setter Methods with ...
    - Injecting Objects by Constructor with the De...
    - The Dependency Injection Design Pattern in P...
    - Performing Inferential Statistical Analysis ...
    - Performing Descriptive Statistical Analysis ...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 5 Hosted by Hostway
    Stay green...Green IT