11

I am using Zend_Paginator in my web-page, where I get the same records in each page....

For Eg. I got the same 4 records in different pages...?

$page=$this->_getParam('page',1);
$paginator = Zend_Paginator::factory($userDetails);
$paginator->setItemCountPerPage(4);
$paginator->setCurrentPageNumber($page);

$this->view->paginator = $paginator;

What may be the problem?

Please help.....

Thanks in advance.....

Jaffer Wilson
  • 7,029
  • 10
  • 62
  • 139
Pushpendra
  • 4,344
  • 5
  • 36
  • 64

2 Answers2

3

If this records you get fro DB, you should make limitPage($page, $rowCount). Or if your data not from DB, you should filtering it by other way. Sorry for my english.

Alex Pliutau
  • 21,392
  • 27
  • 113
  • 143
1

Hard to say with that little information but the most obvious explanation is that $page does not contain what you think it does. In other words, make sure you are actually sending a page parameter in the Request and make sure $page contains that page number.

If you can confirm that the correct page number is passed to setCurrentPageNumber, use a Debugger to step through the program flow to see what happens. Consider upgrading your question with more details then.

Gordon
  • 312,688
  • 75
  • 539
  • 559