We received a lot of enquiry from my blog reader
He asked me how we can implement Perfect Pagination using MYSQL and PHP.I have develope a very simple and perfect script.
This is a simple script to create a pagination using PHP and MySQL.
Its always possible in MySql that your MySql SELECT query statement give thousands of records. But its is not good practice to display all the records on one page. We can also divided these records into many pages as per design requirement.
Pagination means display your query records on multiple pages instead of put all records in one long page.
MySql query allow you to create pagination by using LIMIT clause, LIMIT clause take two arguments. First argument is OFFSET and second argument is how many records you want to fetch from the database.
Below is a simple PHP/MySql script to fetch records using LIMIT clause to generate pagination.