O'Reilly logo

CodeIgniter 1.7 by David Upton, Jose Argudo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Upgrading our CRUD

Of course, you may be thinking about lot of things that we can do to upgrade our application's CRUD. We will see some that are quite useful, for example, pagination—something that is needed in almost every project. Also, we are going to see how to order our records.

Pagination class

Paginating our results is a good way of making life easier for our visitors, as they won't need to search through thousands of records. For us, developers, paginating will be very easy; with this CI class, it will be implemented in a matter of seconds. Want to see how? Let's start. Open your application/controllers/sites.php file, take a look at the index function, that's the one we will modify.

For our pagination to work we need to make some changes. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required