/** * Commit current transaction * * @return bool|void */ public function commit() { if ($this->_transactionDepth === 0) { throw new PDOException('Rollback error : There is no transaction started'); } $this->_transactionDepth--; if ($this->_transactionDepth === 0) { parent::commit(); } else { $this->exec("RELEASE SAVEPOINT LEVEL{$this->_transactionDepth}"); } }
/** * Commit current transaction * * @return bool|void */ public function commit() { $this->_transactionDepth--; if ($this->_transactionDepth == 0) { parent::commit(); } else { $this->exec("RELEASE SAVEPOINT LEVEL{$this->_transactionDepth}"); } }