Re: Pager bug

From: Date: Mon, 02 Jun 2003 08:51:14 +0000
Subject: Re: Pager bug
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-16888@lists.php.net to get a copy of this message
My mistake, apologies. I mistook this for an error in my code :-) cheers Demian Lorenzo Alberton wrote:
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 (#16888) next »