Class X2DbCriteria
CDbCriteria represents a query criteria, such as conditions, ordering by, limit/offset.
It can be used in AR query methods such as CActiveRecord::find and CActiveRecord::findAll.
$criteria=new CDbCriteria(); $criteria->compare('status',Post::STATUS_ACTIVE); $criteria->addInCondition('id',array(1,2,3,4,5,6));
$posts = Post::model()->findAll($criteria);
- CComponent
- CDbCriteria
- X2DbCriteria
Package: system\db\schema
Author: Qiang Xue <qiang.xue@gmail.com>
Since: 1.0
Located at x2engine/protected/components/X2DbCriteria.php
Author: Qiang Xue <qiang.xue@gmail.com>
Since: 1.0
Located at x2engine/protected/components/X2DbCriteria.php
public
static
|
#
compare( string $column, mixed $value, boolean $partialMatch = false, string $operator = 'AND', boolean $escape = true, mixed $ignoreEmpty = true/* x2modend */ )
Modified to allow comparison with empty string. This method is Copyright (c) 2008-2014 by Yii Software LLC http://www.yiiframework.com/license/ |
__construct(),
__wakeup(),
addBetweenCondition(),
addColumnCondition(),
addCondition(),
addInCondition(),
addNotInCondition(),
addSearchCondition(),
mergeWith(),
toArray()
|
__call(),
__get(),
__isset(),
__set(),
__unset(),
asa(),
attachBehavior(),
attachBehaviors(),
attachEventHandler(),
canGetProperty(),
canSetProperty(),
detachBehavior(),
detachBehaviors(),
detachEventHandler(),
disableBehavior(),
disableBehaviors(),
enableBehavior(),
enableBehaviors(),
evaluateExpression(),
getEventHandlers(),
hasEvent(),
hasEventHandler(),
hasProperty(),
raiseEvent()
|
PARAM_PREFIX
|
$alias,
$condition,
$distinct,
$group,
$having,
$index,
$join,
$limit,
$offset,
$order,
$paramCount,
$params,
$scopes,
$select,
$together,
$with
|