How to create Pagination with Codeigniter and MySql

In this tutorial, I will inform you How to create Pagination with Codeigniter and MySql.

Pagination means document content dividing into multiple pages. whenever we have one long page at that time we dividing into multiple pages.

if you want to create pagination using MySQL at that time use limit clause, it takes two arguments first is “offset” and the second is the “end”. end means a number of records returned from the database.

I have share post next and previous button with code in this tutorial and I hope it will be helping you. below example in 3 records displayed per page.

1. Create a Register controller and put bellow code in this file.

2. Create a new register view file and put bellow code in this file.

3. After Create new page method in Register controller.

When perticular page on click then this bellow method call, it method page wise get data from the database and redirect in the view file.

Leave a Reply

Your email address will not be published. Required fields are marked *