Commit 38535530 authored by Alexander Butenko's avatar Alexander Butenko

Merge pull request #412 from avbdr/master

commit() and rollback() methods should return results #41
parents bd2ffbbe 5fd2d734
...@@ -1758,9 +1758,10 @@ class MysqliDb ...@@ -1758,9 +1758,10 @@ class MysqliDb
*/ */
public function commit() public function commit()
{ {
$this->mysqli()->commit(); $result = $this->mysqli()->commit();
$this->_transaction_in_progress = false; $this->_transaction_in_progress = false;
$this->mysqli()->autocommit(true); $this->mysqli()->autocommit(true);
return $result;
} }
/** /**
...@@ -1771,9 +1772,10 @@ class MysqliDb ...@@ -1771,9 +1772,10 @@ class MysqliDb
*/ */
public function rollback() public function rollback()
{ {
$this->mysqli()->rollback(); $result = $this->mysqli()->rollback();
$this->_transaction_in_progress = false; $this->_transaction_in_progress = false;
$this->mysqli()->autocommit(true); $this->mysqli()->autocommit(true);
return $result;
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment