Re: Pager bug

From: Date: Mon, 02 Jun 2003 08:42:17 +0000
Subject: Re: Pager bug
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-16887@lists.php.net to get a copy of this message
At 02/06/2003 10:20 +0200, you wrote:
In the search for a PEAR pagination class, I'm now using Richard's Pager class :-) Aside from a v. small bug this one works as expected. The bug is as follows: (float)total num rows / (float)results per page = result -> result after rounding
138 / 10 = 13.8 -> 14 141 / 10 = 14.1 -> 14
are you sure it's not 15 pages here?
259 / 20 = 12.95 -> 13 the class appears to incorrectly round up the result where it should be rounded down.
Eg: if you have 138 rows, with 10 res/page, you'll need 13 pages to display them, not 14.
This is not a bug. To display 138 rows, with 10 res/page, you'll need _14_ pages indeed.
Who is maintaining Pager now ?
I am. Cheers Lorenzo

« previous php.pear.dev (#16887) next »