How to count(*) the result

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to count(*) the result

atans
This post has NOT been accepted by the mailing list yet.
This post was updated on .
SQL : Select count(*) as total FROM table

How use Zend/Db/sql/Select for this sql on Zend Framework 2?

Thank you.
Reply | Threaded
Open this post in threaded view
|

Re: How to count(*) the result

atans
This post has NOT been accepted by the mailing list yet.
I resolved:
$select->columns(array('c' => new Expression('COUNT(1)')));