PHP
  Home arrow PHP arrow Paginating Database Records with the Code Igniter PHP Framework
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

Paginating Database Records with the Code Igniter PHP Framework
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 8
    2008-08-27


    Table of Contents:
  • Paginating Database Records with the Code Igniter PHP Framework
  • Retrieving user-related data from a MySQL table
  • Paging database records with Code Igniter
  • Completing the development of the sample MySQL-driven application

  • 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


    Paginating Database Records with the Code Igniter PHP Framework
    ( Page 1 of 4 )

    In the previous tutorials in this nine-part series, we built a simple application with the Code Igniter PHP framework. In this article, the third part of the series, we're going to add some important functionality to this application by using the pager class included with Code Igniter.

    Introduction

    Building PHP applications using a third-party framework can be a time-consuming process, particularly in those cases where the software chosen requires installing and configuring a large number of source files, as well as dealing with a long and difficult learning curve.

    Luckily, not all PHP frameworks are created in the same painful way. A good example of this is Code Igniter, a solid piece of software written in PHP 4 that allows you to develop full-featured web applications by means of a friendly API, and by taking advantage of the functionality provided by the Model-View-Controller pattern.

    Therefore, if you’re interested in learning how to use the powerful tools that come packaged with Code Igniter and start creating full-blown database-driven applications in a very short time, then you should start reading this group of articles now!

    And speaking of articles, you’ll surely recall that in the previous one, I explained how to develop a simple MySQL-based web application, which was capable of fetching a few rows straight from a database table and displaying their contents on the browser.

    However, even though the functionality of this introductory application was fairly limited, it’s worth mentioning that this example was built by utilizing the MVC pattern. This means that it was comprised of three modules, that is a model class, then the corresponding controller and finally a simple view for embedding these database rows into a basic HTML page.

    As you may guess, however, Code Igniter comes bundled with a robust set of core classes, which can be used to perform all sorts of clever tasks, such as working with databases, performing file uploads, validating user-supplied data, and so forth.

    So, in this third chapter of this series, I’m going to show you how to improve the MySQL-driven application developed in the preceding tutorial, since it’ll be provided with the capacity for paging database records, via the pager class included with Code Igniter.

    Now, it’s time to get rid of the boring theory and see how easy is to build a pagination system with Code Igniter. Let’s jump in!



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

       

    PHP ARTICLES

    - Using Directory Iterators to Build Loader Ap...
    - Using the spl_autoload() Functions to Build ...
    - Working Out of the Object Context to Build L...
    - Using the _autoload() Magic Function to Buil...
    - The Destruct Magic Function in PHP 5
    - The Autoload Magic Function in PHP 5
    - Developing a Recursive Loading Class for Loa...
    - The Sleep and Wakeup Magic Functions in PHP 5
    - Using the Clone Magic Function in PHP 5
    - Including Files Recursively with Loader Appl...
    - The Call Magic Function in PHP 5
    - Designing a Captcha System with PHP and MySQL
    - Using Static Methods to Build Loader Apps in...
    - The Isset and Unset Magic Functions in PHP 5
    - Advanced PHP Form Input Validation to Check ...





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