public function execute($params = null)
    {
        $t = microtime(true);
        $query = new LoggedQuery();

        try {
            $result = parent::execute($params);
        } catch (Exception $e) {
            $e->queryString = $this->queryString;
            $query->error = $e;
            $this->_log($query, $params, $t);
            throw $e;
        }

        $query->numRows = $this->rowCount();
        $this->_log($query, $params, $t);

        return $result;
    }
public function execute($params = null)
    {
        $t = microtime(true);
        $query = new LoggedQuery();

        try {
            $result = parent::execute($params);
        } catch (Exception $e) {
            $e->queryString = $this->queryString;
            $query->error = $e;
            $this->_log($query, $params, $t);
            throw $e;
        }

        $query->numRows = $this->rowCount();
        $this->_log($query, $params, $t);

        return $result;
    }
public function execute ( $ params = null ) { $ t = microtime ( true ) ; $ query = new LoggedQuery ( ) ; try { $ result = parent :: execute ( $ params ) ; } catch ( Exception $ e ) { $ e -> queryString = $ this -> queryString ; $ query -> error = $ e ; $ this -> _log ( $ query , $ params , $ t ) ; throw $ e ; } $ query -> numRows = $ this -> rowCount ( ) ; $ this -> _log ( $ query , $ params , $ t ) ; return $ result ; }
Wrapper for the execute function to calculate time spent
and log the query afterwards.

@param array|null $params List of values to be bound to query
@return bool True on success, false otherwise
@throws \Exception Re-throws any exception raised during query execution.
Wrapper for the execute function to calculate time spent and log the query afterwards .