Skip to content

Instantly share code, notes, and snippets.

@mariuskubilius
Created December 6, 2012 22:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mariuskubilius/4229105 to your computer and use it in GitHub Desktop.
Save mariuskubilius/4229105 to your computer and use it in GitHub Desktop.
$result = Model::find('all', array(
'conditions' => array(
'$or' => array(
array('hierarchy' => $p->_id),
array('_id' => (string)$c->_id)
)
),
'fields' => array('_id', 'title'),
));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment