Home » CodeIgniter » CodeIgniter creating pagination

CodeIgniter creating pagination

I’ll use CodeIgniter’s pagination library to show you how you can create a paginated list of results from a MySQL database. Along the way, you’ll also see how to fix a problem with the pagination links that the library might produce.That is pretty easy to use and implement.In this tutorial I’ll do a quick example of returning a set of results from a database and paginating those results.

in your controller

Note
$config[‘base_url’] – Full URL to the controller function containing your pagination.
$config[‘total_rows’] – Represents the total rows in the result set you are creating pagination for.
$config[‘per_page’] – Number of items/records to show per page.

In the View file,

That’s only.

Tags

Similar posts

  • sandeep

    It doesnt work at all..only 5 records are displayed and nothing else when clicking next