| @@ 624-636 (lines=13) @@ | ||
| 621 | * |
|
| 622 | * @return bool <p>Boolean true on success, false otherwise.</p> |
|
| 623 | */ |
|
| 624 | public function commit(): bool |
|
| 625 | { |
|
| 626 | if ($this->_in_transaction === false) { |
|
| 627 | $this->_debug->displayError('Error: mysql server is not in transaction!', false); |
|
| 628 | ||
| 629 | return false; |
|
| 630 | } |
|
| 631 | ||
| 632 | $return = mysqli_commit($this->link); |
|
| 633 | \mysqli_autocommit($this->link, true); |
|
| 634 | $this->_in_transaction = false; |
|
| 635 | ||
| 636 | return $return; |
|
| 637 | } |
|
| 638 | ||
| 639 | /** |
|
| @@ 1674-1686 (lines=13) @@ | ||
| 1671 | * |
|
| 1672 | * @return bool <p>Boolean true on success, false otherwise.</p> |
|
| 1673 | */ |
|
| 1674 | public function rollback(): bool |
|
| 1675 | { |
|
| 1676 | if ($this->_in_transaction === false) { |
|
| 1677 | $this->_debug->displayError('Error: mysql server is not in transaction!', false); |
|
| 1678 | ||
| 1679 | return false; |
|
| 1680 | } |
|
| 1681 | ||
| 1682 | $return = \mysqli_rollback($this->link); |
|
| 1683 | \mysqli_autocommit($this->link, true); |
|
| 1684 | $this->_in_transaction = false; |
|
| 1685 | ||
| 1686 | return $return; |
|
| 1687 | } |
|
| 1688 | ||
| 1689 | /** |
|