@@ -36,21 +36,21 @@ Running Transactions
3636====================
3737
3838To run your queries using transactions you will use the
39- ``$this->db->transStart() `` and ``$this->db->transComplete() `` functions as
39+ ``$this->db->transStart() `` and ``$this->db->transComplete() `` methods as
4040follows:
4141
4242.. literalinclude :: transactions/001.php
4343
44- You can run as many queries as you want between the start/complete
45- functions and they will all be committed or rolled back based on the success
44+ You can run as many queries as you want between the `` transStart() ``/`` transComplete() ``
45+ methods and they will all be committed or rolled back based on the success
4646or failure of any given query.
4747
4848Strict Mode
4949===========
5050
5151By default, CodeIgniter runs all transactions in Strict Mode. When strict
5252mode is enabled, if you are running multiple groups of transactions, if
53- one group fails all groups will be rolled back. If strict mode is
53+ one group fails all subsequent groups will be rolled back. If strict mode is
5454disabled, each group is treated independently, meaning a failure of one
5555group will not affect any others.
5656
@@ -61,9 +61,11 @@ Strict Mode can be disabled as follows:
6161Managing Errors
6262===============
6363
64- If you have error reporting enabled in your Config/Database.php file
65- you'll see a standard error message if the commit was unsuccessful. If
66- debugging is turned off, you can manage your own errors like this:
64+ When you have ``DBDebug `` true in your **app/Config/Database.php ** file,
65+ if a query error occurs, all the queries will be rolled backed, and an exception
66+ will be thrown. So you'll see a standard error page.
67+
68+ If the ``DBDebug `` is false, you can manage your own errors like this:
6769
6870.. literalinclude :: transactions/003.php
6971
@@ -84,14 +86,15 @@ Test Mode
8486You can optionally put the transaction system into "test mode", which
8587will cause your queries to be rolled back -- even if the queries produce
8688a valid result. To use test mode simply set the first parameter in the
87- ``$this->db->transStart() `` function to true:
89+ ``$this->db->transStart() `` method to true:
8890
8991.. literalinclude :: transactions/005.php
9092
9193Running Transactions Manually
9294=============================
9395
94- If you would like to run transactions manually you can do so as follows:
96+ When you have ``DBDebug `` false in your **app/Config/Database.php ** file, and
97+ if you would like to run transactions manually you can do so as follows:
9598
9699.. literalinclude :: transactions/006.php
97100
0 commit comments