/** * Executes the statement with the currently bound parameters. * * @param array|null $params * * @return boolean TRUE on success, FALSE on failure. * * @throws \Doctrine\DBAL\DBALException */ 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 (\Exception $ex) { throw DBALException::driverExceptionDuringQuery($ex, $this->sql, $this->conn->resolveParams($this->params, $this->types)); } if ($logger) { $logger->stopQuery(); } $this->params = array(); $this->types = array(); return $stmt; }