@@ -32,25 +32,27 @@ contrast, we've implemented a smart transaction system that does all
3232this for you automatically (you can also manage your transactions
3333manually if you choose to, but there's really no benefit).
3434
35+ .. note :: Since v4.3.0, ``DBDebug`` is true by default in all environments.
36+ When ``DBDebug `` is true, if a query error occurs, all the queries
37+ will be rolled backed, and a ``DatabaseException `` will be thrown.
38+ In previous versions, ``DBDebug `` was false only in production environment,
39+ and different database drivers might throw different exception classes.
40+
3541Running Transactions
3642====================
3743
3844To run your queries using transactions you will use the
3945``$this->db->transStart() `` and ``$this->db->transComplete() `` methods as
4046follows:
4147
48+ .. literalinclude :: transactions/008.php
49+
4250.. literalinclude :: transactions/001.php
4351
4452You can run as many queries as you want between the ``transStart() ``/``transComplete() ``
4553methods and they will all be committed or rolled back based on the success
4654or failure of any given query.
4755
48- .. note :: Since v4.3.0, ``DBDebug`` is true by default in all environments.
49- When ``DBDebug `` is true, if a query error occurs, all the queries
50- will be rolled backed, and an exception will be thrown.
51- In previous versions, ``DBDebug `` was false only in production environment,
52- and different database drivers might throw different exception classes.
53-
5456Strict Mode
5557===========
5658
0 commit comments