开发者

How do I get total record count from Doctrine_Pager?

开发者 https://www.devze.com 2022-12-25 12:04 出处:网络
I am tryign to use Doctrine_Pager for the first time. So I have the following code. $q = Doctrine_Query::create()

I am tryign to use Doctrine_Pager for the first time. So I have the following code.

    $q = Doctrine_Query::create()
         ->from("Member m");


    $pager = new Doctrine_Pager($q,1,10);
    $result = $pager->execu开发者_高级运维te();

I need to know total record count of Member table. How do I get it??


Found it myself.

$pager->getNumResults() returns the value.

0

精彩评论

暂无评论...
验证码 换一张
取 消