Latest news
Home » SocialEngine » zend framework group by select in socialengine

zend framework group by select in socialengine

$viewer = Engine_Api::_()->user()->getViewer();
$iCurUser = $viewer->getIdentity();

$oSelect = $this->getAdapter()->select()
->from(‘engine4_job_usersapplied’, array(‘job_id’, ‘COUNT(job_id) as applied_count’))
->group(‘job_id’)
->where(‘job_user = ?’, $iCurUser);
$result = $this->getAdapter()->fetchAll($oSelect);

Leave a Reply

x

Check Also

Get parameter value in socialengine or zendframework

Get parameter value in socialengine/zendframework $this->_getParam(‘id’, null) $this->getRequest()->getParam(‘fancybox’, null);