Skip to content

Instantly share code, notes, and snippets.

@ridget
Created July 23, 2012 05:12
Show Gist options
  • Save ridget/3162048 to your computer and use it in GitHub Desktop.
Save ridget/3162048 to your computer and use it in GitHub Desktop.
parametizes scope.
public function allInCategory($categoryIds){
$this->getDbCriteria()->mergeWith(array(
'with' => array(
'courseCategories' => array(
'condition' => 'categoryID in (:categoryIds)'
)
),
'params' => array(':categoryIds' => $categoryIds),
));
return $this;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment