From c27bf007eeaf0fa3e6088e30d6b7ea88b7c0b517 Mon Sep 17 00:00:00 2001 From: Derek Allard Date: Tue, 5 Feb 2008 15:30:17 +0000 Subject: minor formatting and typo fix --- user_guide/database/active_record.html | 36 +++++++++++++++++----------------- 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'user_guide/database/active_record.html') 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();

$this->db->flush_cache()

This function deletes all items from the Active Record cache.

Here's a usage example:

-

$this->db->start_cache();
- $this->db->select('field1');
- $this->db->stop_cache();
- $this->db->get('tablename');
- // Results in:
- // SELECT `field1` FROM (`tablename`)
-
- this->db->select('field2');
- $this->db->get('tablename');
- // Results in:
- // SELECT `field1`, `field2` FROM (`tablename`)
-
- $this->db->flush_cache();
-
- this->db->select('field2');
- $this->db->get('tablename');
- // Results in:
- // SELECT `field2` FROM (`tablename`)

+

$this->db->start_cache();
+$this->db->select('field1');
+$this->db->stop_cache();
+$this->db->get('tablename');
+// Results in:
+/ SELECT `field1` FROM (`tablename`)
+
+this->db->select('field2');
+$this->db->get('tablename');
+// Results in:
+// SELECT `field1`, `field2` FROM (`tablename`)
+
+$this->db->flush_cache();
+
+this->db->select('field2');
+$this->db->get('tablename');
+// Results in:
+// SELECT `field2` FROM (`tablename`)

Note: The following fields can be cached: ‘select’, ‘from’, ‘join’, ‘where’, ‘like’, ‘groupby’, ‘having’, ‘orderby’, ‘set’

 

-- cgit v1.2.3-24-g4f1b