summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--user_guide/database/active_record.html36
1 files changed, 18 insertions, 18 deletions
diff --git a/user_guide/database/active_record.html b/user_guide/database/active_record.html
index 9a75992fa..59ac9ae81 100644
--- a/user_guide/database/active_record.html
+++ b/user_guide/database/active_record.html
@@ -723,24 +723,24 @@ $query = $this->db->get();</code>
<h2>$this-&gt;db-&gt;flush_cache()</h2>
<p>This function deletes all items from the Active Record cache.</p>
<p>Here's a usage example:</p>
-<p><code> $this-&gt;db-&gt;start_cache();<br />
- $this-&gt;db-&gt;select('field1');<br />
- $this-&gt;db-&gt;stop_cache();<br />
- $this-&gt;db-&gt;get('tablename');<br />
- // Results in:<br />
- // SELECT `field1` FROM (`tablename`)<br />
- <br />
- this-&gt;db-&gt;select('field2');<br />
- $this-&gt;db-&gt;get('tablename');<br />
- // Results in:<br />
- // SELECT `field1`, `field2` FROM (`tablename`)<br />
- <br />
- $this-&gt;db-&gt;flush_cache();<br />
- <br />
- this-&gt;db-&gt;select('field2');<br />
- $this-&gt;db-&gt;get('tablename');<br />
- // Results in:<br />
- // SELECT `field2` FROM (`tablename`)</code></p>
+<p><code>$this-&gt;db-&gt;start_cache();<br />
+$this-&gt;db-&gt;select('field1');<br />
+$this-&gt;db-&gt;stop_cache();<br />
+$this-&gt;db-&gt;get('tablename');<br />
+// Results in:<br />
+/ SELECT `field1` FROM (`tablename`)<br />
+<br />
+this-&gt;db-&gt;select('field2');<br />
+$this-&gt;db-&gt;get('tablename');<br />
+// Results in:<br />
+// SELECT `field1`, `field2` FROM (`tablename`)<br />
+<br />
+$this-&gt;db-&gt;flush_cache();<br />
+<br />
+this-&gt;db-&gt;select('field2');<br />
+$this-&gt;db-&gt;get('tablename');<br />
+// Results in:<br />
+// SELECT `field2` FROM (`tablename`)</code></p>
<p class="important"> <strong>Note:</strong> The following fields can be cached: ‘select’, ‘from’, ‘join’, ‘where’, ‘like’, ‘groupby’, ‘having’, ‘orderby’, ‘set’</p>
<p>&nbsp;</p>
</div>