| @@ 588-600 (lines=13) @@ | ||
| 585 | * |
|
| 586 | * @return bool <p>Boolean true on success, false otherwise.</p> |
|
| 587 | */ |
|
| 588 | public function commit() |
|
| 589 | { |
|
| 590 | if ($this->_in_transaction === false) { |
|
| 591 | $this->_debug->displayError('Error: mysql server is not in transaction!', false); |
|
| 592 | ||
| 593 | return false; |
|
| 594 | } |
|
| 595 | ||
| 596 | $return = mysqli_commit($this->link); |
|
| 597 | \mysqli_autocommit($this->link, true); |
|
| 598 | $this->_in_transaction = false; |
|
| 599 | ||
| 600 | return $return; |
|
| 601 | } |
|
| 602 | ||
| 603 | /** |
|
| @@ 1572-1584 (lines=13) @@ | ||
| 1569 | * |
|
| 1570 | * @return bool <p>Boolean true on success, false otherwise.</p> |
|
| 1571 | */ |
|
| 1572 | public function rollback() |
|
| 1573 | { |
|
| 1574 | if ($this->_in_transaction === false) { |
|
| 1575 | $this->_debug->displayError('Error: mysql server is not in transaction!', false); |
|
| 1576 | ||
| 1577 | return false; |
|
| 1578 | } |
|
| 1579 | ||
| 1580 | $return = \mysqli_rollback($this->link); |
|
| 1581 | \mysqli_autocommit($this->link, true); |
|
| 1582 | $this->_in_transaction = false; |
|
| 1583 | ||
| 1584 | return $return; |
|
| 1585 | } |
|
| 1586 | ||
| 1587 | /** |
|