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