Skip to content

Commit df90b23

Browse files
committed
docs: add "Resetting Transaction Status"
1 parent fe0f3e7 commit df90b23

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

user_guide_src/source/database/transactions.rst

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ transactions.
1414

1515
.. contents::
1616
:local:
17-
:depth: 2
17+
:depth: 3
1818

1919
CodeIgniter's Approach to Transactions
2020
======================================
@@ -64,6 +64,21 @@ Strict Mode can be disabled as follows:
6464

6565
.. literalinclude:: transactions/002.php
6666

67+
.. _transactions-resetting-transaction-status:
68+
69+
Resetting Transaction Status
70+
----------------------------
71+
72+
.. versionadded:: 4.6.0
73+
74+
When strict mode is enabled, if one transaction fails, all subsequent transactions
75+
will be rolled back.
76+
77+
If you wan to restart transactions after a failure, you can reset the transaction
78+
status:
79+
80+
.. literalinclude:: transactions/009.php
81+
6782
.. _transactions-managing-errors:
6883

6984
Managing Errors
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<?php
2+
3+
$this->db->resetTransStatus();

0 commit comments

Comments
 (0)