framework/db/schema/CDbCommandBuilder.php
public function createCriteria($condition='',$params=array())
	{
		if(is_array($condition))
			$criteria=new CDbCriteria($condition);
		elseif($condition instanceof CDbCriteria)
			$criteria=clone $condition;
		else
		{
			$criteria=new CDbCriteria;
			$criteria->condition=$condition;
			$criteria->params=$params;
		}
		return $criteria;
	}
public function createCriteria($condition='',$params=array())
	{
		if(is_array($condition))
			$criteria=new CDbCriteria($condition);
		elseif($condition instanceof CDbCriteria)
			$criteria=clone $condition;
		else
		{
			$criteria=new CDbCriteria;
			$criteria->condition=$condition;
			$criteria->params=$params;
		}
		return $criteria;
	}
public function createCriteria ( $ condition = '' , $ params = array ( ) ) { if ( is_array ( $ condition ) ) $ criteria = new CDbCriteria ( $ condition ) ; elseif ( $ condition instanceof CDbCriteria ) $ criteria = clone $ condition ; else { $ criteria = new CDbCriteria ; $ criteria -> condition = $ condition ; $ criteria -> params = $ params ; } return $ criteria ; }
Creates a query criteria.
@param mixed $condition query condition or criteria.
If a string, it is treated as query condition (the WHERE clause);
If an array, it is treated as the initial values for constructing a {@link CDbCriteria} object;
Otherwise, it should be an instance of {@link CDbCriteria}.
@param array $params parameters to be bound to an SQL statement.
This is only used when the first parameter is a string (query condition).
In other cases, please use {@link CDbCriteria::params} to set parameters.
@return CDbCriteria the created query criteria
@throws CException if the condition is not string, array and CDbCriteria
Creates a query criteria .