lib/Doctrine/DBAL/Connection.php
public function exec($statement)
    {
        $connection = $this->getWrappedConnection();

        $logger = $this->_config->getSQLLogger();
        if ($logger) {
            $logger->startQuery($statement);
        }

        try {
            $result = $connection->exec($statement);
        } catch (Throwable $ex) {
            throw DBALException::driverExceptionDuringQuery($this->_driver, $ex, $statement);
        }

        if ($logger) {
            $logger->stopQuery();
        }

        return $result;
    }
public function exec($statement)
    {
        $connection = $this->getWrappedConnection();

        $logger = $this->_config->getSQLLogger();
        if ($logger) {
            $logger->startQuery($statement);
        }

        try {
            $result = $connection->exec($statement);
        } catch (Throwable $ex) {
            throw DBALException::driverExceptionDuringQuery($this->_driver, $ex, $statement);
        }

        if ($logger) {
            $logger->stopQuery();
        }

        return $result;
    }
public function exec ( $ statement ) { $ connection = $ this -> getWrappedConnection ( ) ; $ logger = $ this -> _config -> getSQLLogger ( ) ; if ( $ logger ) { $ logger -> startQuery ( $ statement ) ; } try { $ result = $ connection -> exec ( $ statement ) ; } catch ( Throwable $ ex ) { throw DBALException :: driverExceptionDuringQuery ( $ this -> _driver , $ ex , $ statement ) ; } if ( $ logger ) { $ logger -> stopQuery ( ) ; } return $ result ; }
Executes an SQL statement and return the number of affected rows.

@param string $statement

@return int The number of affected rows.

@throws DBALException
Executes an SQL statement and return the number of affected rows .