diff options
Diffstat (limited to 'user_guide')
-rw-r--r-- | user_guide/database/active_record.html | 36 |
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->db->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->db->start_cache();<br />
- $this->db->select('field1');<br />
- $this->db->stop_cache();<br />
- $this->db->get('tablename');<br />
- // Results in:<br />
- // SELECT `field1` FROM (`tablename`)<br />
- <br />
- this->db->select('field2');<br />
- $this->db->get('tablename');<br />
- // Results in:<br />
- // SELECT `field1`, `field2` FROM (`tablename`)<br />
- <br />
- $this->db->flush_cache();<br />
- <br />
- this->db->select('field2');<br />
- $this->db->get('tablename');<br />
- // Results in:<br />
- // SELECT `field2` FROM (`tablename`)</code></p>
+<p><code>$this->db->start_cache();<br />
+$this->db->select('field1');<br />
+$this->db->stop_cache();<br />
+$this->db->get('tablename');<br />
+// Results in:<br />
+/ SELECT `field1` FROM (`tablename`)<br />
+<br />
+this->db->select('field2');<br />
+$this->db->get('tablename');<br />
+// Results in:<br />
+// SELECT `field1`, `field2` FROM (`tablename`)<br />
+<br />
+$this->db->flush_cache();<br />
+<br />
+this->db->select('field2');<br />
+$this->db->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> </p>
</div>
|