diff options
author | admin <devnull@localhost> | 2006-09-26 01:26:12 +0200 |
---|---|---|
committer | admin <devnull@localhost> | 2006-09-26 01:26:12 +0200 |
commit | d125c5c9e9cf3d53e4d6e166e7b44001d02191a3 (patch) | |
tree | 68f1fea8ebafb7e37dfb60a0d12de5c28ebc7ed9 /user_guide/database/transactions.html | |
parent | 3b60ae4ea69a5cfda4561dafd502f8dcc742222e (diff) |
Diffstat (limited to 'user_guide/database/transactions.html')
-rw-r--r-- | user_guide/database/transactions.html | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/user_guide/database/transactions.html b/user_guide/database/transactions.html index 649e4081f..2294afad7 100644 --- a/user_guide/database/transactions.html +++ b/user_guide/database/transactions.html @@ -79,9 +79,11 @@ have a basic understanding of transactions. For most sites, however, transactio <p>Code Igniter utilizes an approach to transactions that is very similar to the process used by the popular database class ADODB. We've chosen that approach
because it greatly simplifies the process of running transactions. In most cases all that is required are two lines of code.</p>
-<p>Traditionally transactions have required a fair amount of work to implement since they demand that you to keep track of your queries
-and determine whether to <dfn>commit</dfn> or <dfn>rollback</dfn> based on the success or failure of your queries. In contrast,
-we've implemented a smart transaction system that does all this for you automatically (you can also manage your transactions manually if you choose to).</p>
+<p>Traditionally, transactions have required a fair amount of work to implement since they demand that you to keep track of your queries
+and determine whether to <dfn>commit</dfn> or <dfn>rollback</dfn> based on the success or failure of your queries. This is particularly cumbersome with
+nested queries. In contrast,
+we've implemented a smart transaction system that does all this for you automatically (you can also manage your transactions manually if you choose to,
+but there's really no benefit).</p>
<h2>Running Transactions</h2>
@@ -95,7 +97,8 @@ $this->db->query('AND YET ANOTHER QUERY...');<br /> <kbd>$this->db->trans_complete();</kbd>
</code>
-<p>You can run as many queries as you want between the start/complete functions and they will all be committed or rolled back based on success or failure.</p>
+<p>You can run as many queries as you want between the start/complete functions and they will all be committed or rolled back based on success or failure
+of any given query.</p>
<h2>Managing Errors</h2>
@@ -111,7 +114,7 @@ $this->db->trans_complete();<br /> <br />
if (<kbd>$this->db->trans_status()</kbd> === FALSE)<br />
{<br />
- // generate an error....<br />
+ // generate an error... or use the log_message() function to log your error<br />
}
</code>
@@ -183,11 +186,11 @@ else<br /> <div id="footer">
<p>
-Previous Topic: <a href="index.html">Database Class</a>
+Previous Topic: <a href="active_record.html">Active Record</a>
·
<a href="#top">Top of Page</a> ·
<a href="../index.html">User Guide Home</a> ·
-Next Topic: <a href="configuration.html">Database Configuration</a>
+Next Topic: <a href="fields.html">Field Metadata</a>
<p>
<p><a href="http://www.codeigniter.com">Code Igniter</a> · Copyright © 2006 · <a href="http://www.pmachine.com">pMachine, Inc.</a></p>
</div>
|