PHP Classes

Range value

Recommend this page to a friend!

      Generic Pager  >  All threads  >  Range value  >  (Un) Subscribe thread alerts  
Subject:Range value
Summary:Issue with "Range" value
Messages:4
Author:Brad Traversy
Date:2012-06-23 17:08:52
Update:2012-06-24 17:45:26
 

 


  1. Range value   Reply   Report abuse  
Picture of Brad Traversy Brad Traversy - 2012-06-23 17:08:52
Hello, this is a great little class, I am just having one problem. I have a database with 20 users in it which I have integrated into the script by changing the query, pdo info, of the mysql.php file. It all works great except, if I leave the "$range" at the default of 10 and I only have 20 entries, the pager goes backwards from 1 to -8. I can fix it by changing the $range to 2 when I instantiate the "Pager" class but then if I add new users/entries, the Pager still stays at 2. The arrows still work but the numbers are only 1 and 2. Not sure I am explaining it right but any help would be appreciated

Brad

  2. Re: Range value   Reply   Report abuse  
Picture of Mark Rolich Mark Rolich - 2012-06-24 13:09:11 - In reply to message 1 from Brad Traversy
Hello Brad,

I've fixed that bug and updated Pager.php file.

Best regards,
Mark Rolich

  3. Re: Range value   Reply   Report abuse  
Picture of Mark Rolich Mark Rolich - 2012-06-24 13:11:25 - In reply to message 1 from Brad Traversy
Thanks for finding the bug :)

  4. Re: Range value   Reply   Report abuse  
Picture of Brad Traversy Brad Traversy - 2012-06-24 17:45:26 - In reply to message 3 from Mark Rolich
No Problem :)