Skip to content

Commit

Permalink
Added usage example to CDbCriteria phpdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
samdark committed Apr 15, 2012
1 parent 22a5213 commit b74caf3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions framework/db/schema/CDbCriteria.php
Expand Up @@ -11,6 +11,14 @@
/** /**
* CDbCriteria represents a query criteria, such as conditions, ordering by, limit/offset. * 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);
*
* @author Qiang Xue <qiang.xue@gmail.com> * @author Qiang Xue <qiang.xue@gmail.com>
* @version $Id$ * @version $Id$
* @package system.db.schema * @package system.db.schema
Expand Down

0 comments on commit b74caf3

Please sign in to comment.