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(
  5.         'Inhabitation'=>array(
  6.             'conditions'=>array(
  7.                 'Inhabitation.from <='=>date('Y-m-d'),
  8.                 'Inhabitation.to >='=>date('Y-m-d'),
  9.                 ),
  10.                         'group' => 'Client.id'
  11.             ),
  12.         ),
  13.     ));
Parsed in 0.044 seconds, using GeSHi 1.0.7.14

Modify this Paste