Skip to content

Instantly share code, notes, and snippets.

@rynop
Created February 21, 2011 19:50
Show Gist options
  • Save rynop/837599 to your computer and use it in GitHub Desktop.
Save rynop/837599 to your computer and use it in GitHub Desktop.
$devices = $this->find('first',array(
'contain'=>array(
'Device'=>array(
'fields'=>array('id','name'),
'conditions'=>array('Device.public'=>1,'Device.deprecated'=>0)
)
),
'fields'=>array('id'),
'conditions'=>array('Ad.id'=>$adId)
)
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment