07.04 php saved
francky06l
Tags add more
 
Note
francky06l did not leave a note
  1. $this->Client->unbindModel(array('hasMany' => array('Inhabitation')), false);
  2. $this->Client->bindModel(array('hasOne' => array('Inhabitation')), false);
  3. $clients = $this->Client->find('all', array(
  4.     'contain'=>array('Inhabitation'),
  5.         'conditions'=>array('Inhabitation.from <='=>date('Y-m-d'),
  6.                      'Inhabitation.to >='=>date('Y-m-d'),
  7.                     ),
  8.         'group' => 'Client.id'
  9.     ));
Parsed in 0.041 seconds, using GeSHi 1.0.7.14

Modify this Paste