You can use like this :

use Zend\Db\Sql\Select; <~ import this 


    $result  = $this->select(function (Select $select) use ($id){
        $select->columns(array('count' => new Expr('count(id)')));
    });
  
    return $result;



--
View this message in context: 
http://zend-framework-community.634137.n4.nabble.com/Executing-manually-built-SQL-queries-Is-there-an-easier-way-tp4657944p4657945.html
Sent from the Zend Framework mailing list archive at Nabble.com.

-- 
List: [email protected]
Info: http://framework.zend.com/archives
Unsubscribe: [email protected]


Reply via email to