2012-02-14 85 views
0

CakePHP PaginatorHelper有一個用於獲取記錄計數的功能(表中的所有記錄,而不僅僅是本頁)?像mysql的COUNT()或PHP的mysql_num_rows()paginator統計所有記錄

或者我應該使用控制器的find()函數?

非常感謝。

回答

1

counter()方法可用於這一點。

echo $this->Paginator->counter(array('format' => '{:count}'));