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? 
Google.com  
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

    - Implementing the Iterator SPL Interface
    - Building a Data Access Layer for the Data Ma...
    - Building a Singleton Database with Restricti...
    - Working with Reflected Properties with the R...
    - The Iterator, Countable and ArrayAccess SPL ...
    - Implementing the Data Mapper Design Pattern ...
    - Defining an Abstract Class with Restrictive ...
    - The Reflection API: Working with Reflected M...
    - Using Restrictive Constructors in PHP 5
    - Getting Information on a Reflected Class wit...
    - Introducing the Reflection API in PHP 5
    - Swift Mailer's Batchsend Method and Other Fe...
    - Embedding Attachments into Email Messages wi...
    - Dynamically Attaching Files with Swift Mailer
    - Using Different Paths for Attachments with S...


    Code Analysis Tools
    Enterprise code analysis tools that deliver quality and reliable code

     



    © 2003-2010 by Developer Shed. All rights reserved. DS Cluster 8 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek