PHP Classes

Pagination for content: Divide content into pages

Recommend this page to a friend!
  All requests RSS feed  >  Pagination for content  >  Request new recommendation  >  A request is featured when there is no good recommended package on the site when it is posted. Featured requests  >  No recommendations No recommendations  

Pagination for content

Edit

Picture of Pranoti by Pranoti - 9 years ago (2015-07-29)

Divide content into pages

This request is clear and relevant.
This request is not clear or is not relevant.

+8

I need to divide content into multiple pages.

Ask clarification

2 Recommendations

Better PDO Pagination: Display pagination links for SQL queries using PDO

This class can display pagination links for SQL queries using PDO.

It takes a PDO object with database connection already opened and a SQL query as parameters to count the total number of result set rows.

The class can generate HTML links to browse the between the pages of the listing of results assuming a given the number of the current page, the limit number of results to display per page and a limit number of result page browsing links.
This recommendation solves the problem.
This recommendation does not solve the problem.

+2

Picture of Dave Smith by Dave Smith Reputation 7620 - 9 years ago (2015-08-04) Comment

Here is a highly rated class using mySQL object results from a query to return html page links.

  • 1 Comment
  • 1. Picture of Manuel Lemos by Manuel Lemos - 9 years ago (2015-08-05) Reply

    Yes, that can be a good solution too.

    The example uses MySQL, but since the connection is a parameter, it can be as well other types of databases that support the LIMIT and OFFSET clauses to define the range of rows to retrieve from the current page.


PHP Pagination Bootstrap: Show pagination of MySQL results for Bootstrap

This class can show pagination of MySQL results for Bootstrap.

It extends the MySQLi wrapper to retrieve result rows for a query to a given table to display on a given page of a paginated listing.

The class can return result rows, as well HTML for the pagination links for use with Bootstrap.
This recommendation solves the problem.
This recommendation does not solve the problem.

+4

Picture of Manuel Lemos by Manuel Lemos Reputation 26695 - 9 years ago (2015-08-04) Comment

If you use the Bootstrap library, this package maybe solve your project if you are taking the content from MySQL databases.


Recommend package
: 
: