lib/Doctrine/DBAL/Statement.php
public function execute($params = null)
    {
        if (is_array($params)) {
            $this->params = $params;
        }

        $logger = $this->conn->getConfiguration()->getSQLLogger();
        if ($logger) {
            $logger->startQuery($this->sql, $this->params, $this->types);
        }

        try {
            $stmt = $this->stmt->execute($params);
        } catch (Throwable $ex) {
            if ($logger) {
                $logger->stopQuery();
            }
            throw DBALException::driverExceptionDuringQuery(
                $this->conn->getDriver(),
                $ex,
                $this->sql,
                $this->conn->resolveParams($this->params, $this->types)
            );
        }

        if ($logger) {
            $logger->stopQuery();
        }
        $this->params = [];
        $this->types  = [];

        return $stmt;
    }
public function execute($params = null)
    {
        if (is_array($params)) {
            $this->params = $params;
        }

        $logger = $this->conn->getConfiguration()->getSQLLogger();
        if ($logger) {
            $logger->startQuery($this->sql, $this->params, $this->types);
        }

        try {
            $stmt = $this->stmt->execute($params);
        } catch (Throwable $ex) {
            if ($logger) {
                $logger->stopQuery();
            }
            throw DBALException::driverExceptionDuringQuery(
                $this->conn->getDriver(),
                $ex,
                $this->sql,
                $this->conn->resolveParams($this->params, $this->types)
            );
        }

        if ($logger) {
            $logger->stopQuery();
        }
        $this->params = [];
        $this->types  = [];

        return $stmt;
    }
public function execute ( $ params = null ) { if ( is_array ( $ params ) ) { $ this -> params = $ params ; } $ logger = $ this -> conn -> getConfiguration ( ) -> getSQLLogger ( ) ; if ( $ logger ) { $ logger -> startQuery ( $ this -> sql , $ this -> params , $ this -> types ) ; } try { $ stmt = $ this -> stmt -> execute ( $ params ) ; } catch ( Throwable $ ex ) { if ( $ logger ) { $ logger -> stopQuery ( ) ; } throw DBALException :: driverExceptionDuringQuery ( $ this -> conn -> getDriver ( ) , $ ex , $ this -> sql , $ this -> conn -> resolveParams ( $ this -> params , $ this -> types ) ) ; } if ( $ logger ) { $ logger -> stopQuery ( ) ; } $ this -> params = [ ] ; $ this -> types = [ ] ; return $ stmt ; }
Executes the statement with the currently bound parameters.

@param mixed[]|null $params

@return bool TRUE on success, FALSE on failure.

@throws DBALException
Executes the statement with the currently bound parameters .