extendeddbcriteria

Allows us the ability to create nested conditions in a single criteria
3 followers

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);

Resources

Github page...

Be the first person to leave a comment

Please to leave your comment.

Create extension
Downloads
No downloadable files yet