cakephp: how to make NOW() work in search condition ?

Posted by kaklon on Stack Overflow See other posts from Stack Overflow or by kaklon
Published on 2010-04-20T21:21:56Z Indexed on 2010/04/21 1:53 UTC
Read the original article Hit count: 210

Filed under:
|

I'm trying to get all records with date greater then now. I tried this but it doeasnt work:

$all_dates = $this->TourDate->find('all', array('conditions' => array('TourDate.date >=' => 'NOW()'), 'order' => array('TourDate.date ASC')));

If I replace NOW() with the current date it works. Why's that?

© Stack Overflow or respective owner

Related posts about cakephp

Related posts about mysql-query