diff --git a/user_guide_src/source/database/transactions.rst b/user_guide_src/source/database/transactions.rst index 5d01d883a5d5..5c48f2806240 100644 --- a/user_guide_src/source/database/transactions.rst +++ b/user_guide_src/source/database/transactions.rst @@ -14,7 +14,7 @@ transactions. .. contents:: :local: - :depth: 2 + :depth: 3 CodeIgniter's Approach to Transactions ====================================== @@ -64,6 +64,21 @@ Strict Mode can be disabled as follows: .. literalinclude:: transactions/002.php +.. _transactions-resetting-transaction-status: + +Resetting Transaction Status +---------------------------- + +.. versionadded:: 4.6.0 + +When strict mode is enabled, if one transaction fails, all subsequent transactions +will be rolled back. + +If you wan to restart transactions after a failure, you can reset the transaction +status: + +.. literalinclude:: transactions/009.php + .. _transactions-managing-errors: Managing Errors diff --git a/user_guide_src/source/database/transactions/009.php b/user_guide_src/source/database/transactions/009.php new file mode 100644 index 000000000000..6b92adf1793f --- /dev/null +++ b/user_guide_src/source/database/transactions/009.php @@ -0,0 +1,3 @@ +db->resetTransStatus();