PN Generator (Pagination)

This class can be used to generate links to browse MySQL database query results split in multiple pages.

It takes as parameters an SQL query and a limit number of results to display per page.

The class executes the query to obtain the total number of results and generates HTML links to browse to the next, previous and other pages over which the query results will be displayed.

Inside the zip file there is a file called example1.php which you need to configure first by setting up your database connection strings, your query and how many results to display in each page.

  • You can download the class file here.

Leave a Reply