CakePHP 2 : Query to datetime field with date condition only
function visitorCount($date) {
return $this->Visitorcounter->find(‘count’, array(
‘conditions’ => array(‘DATE(Visitorcounter.created)’ => $date)
));
}
return $this->Visitorcounter->find(‘count’, array(
‘conditions’ => array(‘DATE(Visitorcounter.created)’ => $date)
));
}