framework/db/Command.php
public function delete($table, $condition = '', $params = [])
    {
        $sql = $this->db->getQueryBuilder()->delete($table, $condition, $params);

        return $this->setSql($sql)->bindValues($params);
    }
public function delete($table, $condition = '', $params = [])
    {
        $sql = $this->db->getQueryBuilder()->delete($table, $condition, $params);

        return $this->setSql($sql)->bindValues($params);
    }
public function delete ( $ table , $ condition = '' , $ params = [ ] ) { $ sql = $ this -> db -> getQueryBuilder ( ) -> delete ( $ table , $ condition , $ params ) ; return $ this -> setSql ( $ sql ) -> bindValues ( $ params ) ; }
Creates a DELETE command.

For example,

```php
$connection->createCommand()->delete('user', 'status = 0')->execute();
```

or with using parameter binding for the condition:

```php
$status = 0;
$connection->createCommand()->delete('user', 'status = :status', [':status' => $status])->execute();
```

The method will properly escape the table and column names.

Note that the created command is not executed until [[execute()]] is called.

@param string $table the table where the data will be deleted from.
@param string|array $condition the condition that will be put in the WHERE part. Please
refer to [[Query::where()]] on how to specify condition.
@param array $params the parameters to be bound to the command
@return $this the command object itself
Creates a DELETE command .