I have a request in CakePHP that has a saved "datetime" field called DropIn.drop_in_time . I would only like to βfindβ the entries where DropIn.drop_in_time is > NOW() , but I had trouble getting it.
Condition DropIn.drop_in_time >' => 'NOW() did not get the correct results in the query below. Is there a better way to do this?
$requests = $this->DropIn->find('all', array( 'conditions' => array('DropIn.drop_in_time >' => 'NOW()', 'or' => array(array('DropIn.user_id' => $this->Auth->user('id')), array('DropIn.id' => $drop_in_ids))), 'order'=>array('DropIn.created'=>'DESC')));
source share