- $criteria = new CDbCriteria;
- $criteria->addCondition("id=1");
- $criteria->addInCondition('id', array(1,2,3,4,5));
- $criteria->addNotInCondition('id', array(1,2,3,4,5));
- $criteria->addCondition('id=1','OR');
- $criteria->addSearchCondition('name', '分类');
- $criteria->addBetweenCondition('id', 1, 4);
-
- $criteria->compare('id', 1);
-
-
- $criteria->addCondition("id = :id");
- $criteria->params[':id']=1;
-
- $criteria->select = 'id,parentid,name';
- $criteria->join = 'xxx';
- $criteria->with = 'xxx';
- $criteria->limit = 10;
- $criteria->offset = 1;
- $criteria->order = 'xxx DESC,XXX ASC' ;
- $criteria->group = 'group 条件';
- $criteria->having = 'having 条件 ';
- $criteria->distinct = FALSE;
posted @
2019-04-29 15:58
gram5988
阅读(
117)
评论()
编辑
收藏
举报