Allows us the ability to create nested conditions
Requirements ¶
requirements of using this extension (e.g. Yii 1.1 or above)...
Usage ¶
Example
$criteria = new ExtendedDbCriteria;
$criteria->compare('branch_id',$branch_id);
$criteria->compare('classification',$classification) ;
$criteria ->beginSubCriteria()
->compare('item_code', $_GET['item_code'], TRUE)
->compare('description', $_GET['item_code'], TRUE, 'OR')
->beginSubCriteria('OR')
->compare('another', $_GET['another'], TRUE, 'OR')
->endSubCriteria()
->endSubCriteria();
$count = ItemHeader::model()->findAll($criteria);
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.