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

  1. Requirements
  2. Usage
  3. Resources

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...

0 0
3 followers
0 downloads
Yii Version: Unknown
License: BSD-2-Clause
Category: Database
Developed by: ezekielnoob
Created on: Jul 28, 2013
Last updated: 11 years ago

Related Extensions