$aEventsSelect = Engine_Api::_()->getItemTable(‘event’)->select(); if(count($aEventIds) > 0){ $aEventsSelect->where(“event_id IN (?)”, $aEventIds); } if( $filter == “past” ) { $aEventsSelect->where(“endtime <= FROM_UNIXTIME(?)”, time()); } else { $aEventsSelect->where(“endtime > FROM_UNIXTIME(?)”, time()); } if($eventdate != ‘0’) { $whereSql = “‘{$eventdate}’ BETWEEN DATE(starttime) AND DATE(endtime)”; $aEventsSelect->where($whereSql); }
Category: zendframework
zendframework tips and tutorials, zendframework source codes, zendframework sql queries
How to change the redirection page after login in socialengine
socialengine is a zendframework based project helps the developers to build their own custom social network website. socialengine following the MVC structure. The login action is in user/controllers/AuthController.php Here we specify the redirection URL return $this->_helper->redirector->gotoRoute(array(“action” => ‘home’) , “user_general” , true); change the user router according to your need.
Get parameter value in socialengine or zendframework
Get parameter value in socialengine/zendframework $this->_getParam(‘id’, null) $this->getRequest()->getParam(‘fancybox’, null);
Get core settings value in social engine
Get core settings value in social engine Engine_Api::_()->getApi(‘settings’, ‘core’)->getFlatSetting(‘core_general.uniistatsmail’, array(”));
Socialengine/zend simple Update Query
Update query using Socialengine or zendframework. Engine_Db_Table::getDefaultAdapter()->update(‘engine4_activity_actions’, array(‘like_count’=>sizeof($oLikes)) , array(‘action_id = ?’=>$iId) );