CakePHP Find Condition For A Query Between Two Dates
Answer : $conditions = array( 'conditions' => array( 'and' => array( array('Item.date_start <= ' => $date, 'Item.date_end >= ' => $date ), 'Item.title LIKE' => "%$title%", 'Item.status_id =' => '1' ))); Try the above code and ask if it not worked for you. Edit: As per @Aryan request, if we have to find users registered between 1 month: $start_date = '2013-05-26'; //should be in YYYY-MM-DD format $this->User->find('all', array('conditions' => array('User.reg_date BETWEEN '.$start_date.' AND DATE_ADD('.$start_date.', INTERVAL 30 DAY)'))); Here is CakePHP BETWEEN query example. I'm defining my arrays as variables, and then using those variables in my CakePHP find function call: // just return...