| @@ 628-640 (lines=13) @@ | ||
| 625 | * |
|
| 626 | * @return bool <p>Boolean true on success, false otherwise.</p> |
|
| 627 | */ |
|
| 628 | public function commit(): bool |
|
| 629 | { |
|
| 630 | if ($this->_in_transaction === false) { |
|
| 631 | $this->_debug->displayError('Error: mysql server is not in transaction!', false); |
|
| 632 | ||
| 633 | return false; |
|
| 634 | } |
|
| 635 | ||
| 636 | $return = \mysqli_commit($this->link); |
|
| 637 | \mysqli_autocommit($this->link, true); |
|
| 638 | $this->_in_transaction = false; |
|
| 639 | ||
| 640 | return $return; |
|
| 641 | } |
|
| 642 | ||
| 643 | /** |
|
| @@ 1681-1693 (lines=13) @@ | ||
| 1678 | * |
|
| 1679 | * @return bool <p>Boolean true on success, false otherwise.</p> |
|
| 1680 | */ |
|
| 1681 | public function rollback(): bool |
|
| 1682 | { |
|
| 1683 | if ($this->_in_transaction === false) { |
|
| 1684 | $this->_debug->displayError('Error: mysql server is not in transaction!', false); |
|
| 1685 | ||
| 1686 | return false; |
|
| 1687 | } |
|
| 1688 | ||
| 1689 | $return = \mysqli_rollback($this->link); |
|
| 1690 | \mysqli_autocommit($this->link, true); |
|
| 1691 | $this->_in_transaction = false; |
|
| 1692 | ||
| 1693 | return $return; |
|
| 1694 | } |
|
| 1695 | ||
| 1696 | /** |
|