lib/Doctrine/DBAL/Connection.php
public function delete($tableExpression, array $identifier, array $types = [])
    {
        if (empty($identifier)) {
            throw InvalidArgumentException::fromEmptyCriteria();
        }

        $columns = $values = $conditions = [];

        $this->addIdentifierCondition($identifier, $columns, $values, $conditions);

        return $this->executeUpdate(
            'DELETE FROM ' . $tableExpression . ' WHERE ' . implode(' AND ', $conditions),
            $values,
            is_string(key($types)) ? $this->extractTypeValues($columns, $types) : $types
        );
    }
public function delete($tableExpression, array $identifier, array $types = [])
    {
        if (empty($identifier)) {
            throw InvalidArgumentException::fromEmptyCriteria();
        }

        $columns = $values = $conditions = [];

        $this->addIdentifierCondition($identifier, $columns, $values, $conditions);

        return $this->executeUpdate(
            'DELETE FROM ' . $tableExpression . ' WHERE ' . implode(' AND ', $conditions),
            $values,
            is_string(key($types)) ? $this->extractTypeValues($columns, $types) : $types
        );
    }
public function delete ( $ tableExpression , array $ identifier , array $ types = [ ] ) { if ( empty ( $ identifier ) ) { throw InvalidArgumentException :: fromEmptyCriteria ( ) ; } $ columns = $ values = $ conditions = [ ] ; $ this -> addIdentifierCondition ( $ identifier , $ columns , $ values , $ conditions ) ; return $ this -> executeUpdate ( 'DELETE FROM ' . $ tableExpression . ' WHERE ' . implode ( ' AND ' , $ conditions ) , $ values , is_string ( key ( $ types ) ) ? $ this -> extractTypeValues ( $ columns , $ types ) : $ types ) ; }
Executes an SQL DELETE statement on a table.

Table expression and columns are not escaped and are not safe for user-input.

@param string         $tableExpression The expression of the table on which to delete.
@param mixed[]        $identifier      The deletion criteria. An associative array containing column-value pairs.
@param int[]|string[] $types           The types of identifiers.

@return int The number of affected rows.

@throws DBALException
@throws InvalidArgumentException
Executes an SQL DELETE statement on a table .