Home arrow PHP arrow Paginating Database Records with the Code Igniter PHP Framework

Paginating Database Records with the Code Igniter PHP Framework

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.

  1. Paginating Database Records with the Code Igniter PHP Framework
  2. Retrieving user-related data from a MySQL table
  3. Paging database records with Code Igniter
  4. Completing the development of the sample MySQL-driven application
By: Alejandro Gervasio
Rating: starstarstarstarstar / 21
August 27, 2008

print this article




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

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort


- Hackers Compromise PHP Sites to Launch Attac...
- Red Hat, Zend Form OpenShift PaaS Alliance
- PHP IDE News
- BCD, Zend Extend PHP Partnership
- PHP FAQ Highlight
- PHP Creator Didn't Set Out to Create a Langu...
- PHP Trends Revealed in Zend Study
- PHP: Best Methods for Running Scheduled Jobs
- PHP Array Functions: array_change_key_case
- PHP array_combine Function
- PHP array_chunk Function
- PHP Closures as View Helpers: Lazy-Loading F...
- Using PHP Closures as View Helpers
- PHP File and Operating System Program Execut...
- PHP: Effects of Wrapping Code in Class Const...

Developer Shed Affiliates


Dev Shed Tutorial Topics: