19

I am using Zend_Pagintor class with Zend_Db_Table_Abstract .

Zend_Pagintor has a count() method but it always returns 1!

How do i get row counts?

rahim asgari
  • 12,197
  • 10
  • 43
  • 53

2 Answers2

37

You can use:

$paginator->getTotalItemCount();
subosito
  • 3,420
  • 2
  • 24
  • 12
27

Pick the right one for your needs:

  • count returns the number of pages.
  • getAbsoluteItemNumber returns the absolute item number for the specified item.
  • getCurrentItemCount returns the number of items for the current page.
  • getItemCount returns the number of items in a collection.
  • getItemCountPerPage returns the number of items per page.
  • getTotalItemCount returns the total number of items available.

You are probably looking for getCurrentItemCount or getTotalItemCount

Check the API Docs for more details: http://framework.zend.com/apidoc/1.12

Gordon
  • 312,688
  • 75
  • 539
  • 559