PHP
  Home arrow PHP arrow Previous or Next? Paginating Records w...
Dev Shed Forums 
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Sun Developer Network 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Mobile Linux 
App Generation ROI 
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

Previous or Next? Paginating Records with PHP - Part 2
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 8
    2005-05-03

    Table of Contents:
  • Previous or Next? Paginating Records with PHP - Part 2
  • Taking the procedural approach: the friendly "paginateRecords()" function
  • Taking the OOP approach: defining the "Pager" PHP class
  • Defining the "displayRecords()" method
  • Source code ahead: completing the "displayRecords()" method
  • Pager class implementation

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb 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


    Previous or Next? Paginating Records with PHP - Part 2


    (Page 1 of 6 )

    In the first article in this series, we learned how to do simple pagination of records taken from a text file. In this article, we will look at pagination for a larger group of records, using an Objected Oriented rather than a procedural approach to creating the application.

    Introduction

    Welcome to Part II of the article "Previous or Next? Paginating Records with PHP." I really hope that you enjoyed reading the first article as much as I did writing it. For those faithful readers who spent some time reading over the first part, I have good news. In this second part, we're going to head toward the OOP approach, defining a class for paginating records. In this way we will discover a better solution, useful for applying to larger Web projects.

    However, for those catching up right now, don't be disappointed! Before we go more deeply into any attempt to define a PHP class, we'll review the concepts previously explained, looking briefly at the function originally created to paginate records, which used a procedural orientation.

    Having examined the preliminaries, it's time to go more deeply into the area of record paging in PHP. Are you ready to move on? Fine, because it's going to be really fun. Let's get started.

    More PHP Articles
    More By Alejandro Gervasio


       · This second article transits the OOP approach to build up a class to paginate data...
       · Thanks and congratulations for your articles...i was expecting this 2nd part... i...
       · Thanks a lot for the compliments about the articles. If you have found useful this...
       · Great! While waiting for the 3rd part, i'm going to 'train' php by modifying the...
       · Thanks for the comments. I'm glad you to develop your own paging solution. Just go...
       · Where you are paging by 10 records should that be... ...
       · We made the changes to the code.Thanks,Editorial Staff.
       · Yes, that was already pointed before as you can see in previous posts, and it was...
     

       

    PHP ARTICLES

    - Authentication Scripts for a User Management...
    - Utilizing the Use Keyword for Namespaces in ...
    - Building a User Management Application
    - Working With Different Namespaces in PHP 5
    - User Management Explained: Overview
    - Using Namespaces in PHP 5
    - Database Security: Guarding Against SQL Inje...
    - Building a Modular Exception Class in PHP 5
    - Database and Password Security for Web Appli...
    - Handling MySQL Data Set Failures in PHP 5
    - Building Site Registration for Web Applicati...
    - Intercepting Customized Exceptions in PHP 5
    - Securing Your Web Application Against Attacks
    - Sub Classing Exceptions in PHP 5
    - Authentication for Web Application Security





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
    Stay green...Green IT