framework/db/schema/CDbCommandBuilder.php
public function createDeleteCommand($table,$criteria)
	{
		$this->ensureTable($table);
		$sql="DELETE FROM {$table->rawName}";
		$sql=$this->applyJoin($sql,$criteria->join);
		$sql=$this->applyCondition($sql,$criteria->condition);
		$sql=$this->applyGroup($sql,$criteria->group);
		$sql=$this->applyHaving($sql,$criteria->having);
		$sql=$this->applyOrder($sql,$criteria->order);
		$sql=$this->applyLimit($sql,$criteria->limit,$criteria->offset);
		$command=$this->_connection->createCommand($sql);
		$this->bindValues($command,$criteria->params);
		return $command;
	}
public function createDeleteCommand($table,$criteria)
	{
		$this->ensureTable($table);
		$sql="DELETE FROM {$table->rawName}";
		$sql=$this->applyJoin($sql,$criteria->join);
		$sql=$this->applyCondition($sql,$criteria->condition);
		$sql=$this->applyGroup($sql,$criteria->group);
		$sql=$this->applyHaving($sql,$criteria->having);
		$sql=$this->applyOrder($sql,$criteria->order);
		$sql=$this->applyLimit($sql,$criteria->limit,$criteria->offset);
		$command=$this->_connection->createCommand($sql);
		$this->bindValues($command,$criteria->params);
		return $command;
	}
public function createDeleteCommand ( $ table , $ criteria ) { $ this -> ensureTable ( $ table ) ; $ sql = "DELETE FROM {$table->rawName}" ; $ sql = $ this -> applyJoin ( $ sql , $ criteria -> join ) ; $ sql = $ this -> applyCondition ( $ sql , $ criteria -> condition ) ; $ sql = $ this -> applyGroup ( $ sql , $ criteria -> group ) ; $ sql = $ this -> applyHaving ( $ sql , $ criteria -> having ) ; $ sql = $ this -> applyOrder ( $ sql , $ criteria -> order ) ; $ sql = $ this -> applyLimit ( $ sql , $ criteria -> limit , $ criteria -> offset ) ; $ command = $ this -> _connection -> createCommand ( $ sql ) ; $ this -> bindValues ( $ command , $ criteria -> params ) ; return $ command ; }
Creates a DELETE command.
@param mixed $table the table schema ({@link CDbTableSchema}) or the table name (string).
@param CDbCriteria $criteria the query criteria
@return CDbCommand delete command.
Creates a DELETE command .