Skip to content

Instantly share code, notes, and snippets.

@tareko
Created December 18, 2012 18:05
Show Gist options
  • Select an option

  • Save tareko/4330439 to your computer and use it in GitHub Desktop.

Select an option

Save tareko/4330439 to your computer and use it in GitHub Desktop.
Trying to figure out how to set as a condition a Profile.cb_ohip
$conditions = array_merge($conditions, array(
'Profile.cb_ohip' => $healthcare_provider,
));
return $this->User->Profile->find('all', array(
'contain' => array(
'Shift' => array(
'fields' => array('id', 'date'),
'conditions' => array(
'Shift.date >=' => $start_date,
'Shift.date <=' => $end_date,
),
'ShiftsType' => array(
'fields' => array('id', 'shift_start', 'shift_end'),
'Location' => array(
'fields' => 'location')),
'User' => array(
'fields' => array('name'),
))),
'fields' => array('cb_ohip'),
'conditions' => $conditions,
'recursive' => '3',
));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment