Latest news
Home » SQL » zend mysql between query

zend mysql between query

$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);

}

Leave a Reply

x

Check Also

How can be list the installed SQL Server instances

Press window+R windows run window will open and then type cmd Command prompt will open ...