Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

PHP Magazine:
PEAR:Pager Makes (Paged) Life Easy
Mar 11, 2004 @ 13:01:04

In a post from PHP Magazine this morning, there's a new PEAR module that's getting some attention for it's functionality.

If you have ever created reports using PHP and SQL server, and wondered how to let your user view a limited number of records per page, and navigate to other pages if needed, then this post on pear-general and the solution that followed might help:

"I have created a few reports using SQL Server and PHP. The reports work just fine except that we have like 19000 records per report. I would like to do some paging within the reports 1 | 2 | 3 | 4 so that a user can view, may be 1000 records per page, and can navigate to other pages if needed."

Coming in to save the day? PEAR: Pager! It takes in an array, and gives other parameters to allow you to page through those results. There are even functions like getPreviousPage, getPageData, and numPages to help you make the most of this package...

tagged:

Link:


Trending Topics: