Reputation: 7358
Does CakePHP PaginatorHelper have a function for getting a record count (all records in the table, not only on this page)? Like mysql's COUNT()
or PHP's mysql_num_rows()
.
Or i should use the controller's find()
function?
Thanks, a lot.
Upvotes: 0
Views: 1435
Reputation: 34877
The counter() method can be used for that.
echo $this->Paginator->counter(array('format' => '{:count}'));
Upvotes: 2
Reputation: 11829
You can use/overwrite paginageCount
: http://book.cakephp.org/1.2/view/249/Custom-Query-Pagination
Upvotes: 0