summaryrefslogtreecommitdiffstats
path: root/user_guide/database
diff options
context:
space:
mode:
authorKyle Farris <kylefarris@gmail.com>2011-08-31 17:52:20 +0200
committerKyle Farris <kylefarris@gmail.com>2011-08-31 17:52:20 +0200
commit2de2fa022253597c8f5c807218be3aa05fac340e (patch)
tree43f87056b43d4b75b5e8062d9ecdb84b28f8dc62 /user_guide/database
parent7611601875b619d8201633cf16a790b356182039 (diff)
Merged changes with development.
Diffstat (limited to 'user_guide/database')
-rw-r--r--user_guide/database/active_record.html9
1 files changed, 7 insertions, 2 deletions
diff --git a/user_guide/database/active_record.html b/user_guide/database/active_record.html
index d53630402..874dda58e 100644
--- a/user_guide/database/active_record.html
+++ b/user_guide/database/active_record.html
@@ -337,7 +337,6 @@ $this->db->or_where('id >', $id);
<li><strong>Simple key/value method:</strong>
<code>$this->db->like('title', 'match');
- <br /><br />// Produces: WHERE title LIKE '%match%' </code>
<p>If you use multiple function calls they will be chained together with <var>AND</var> between them:</p>
@@ -356,6 +355,13 @@ $this->db->or_where('id >', $id);
$this-&gt;db-&gt;like('title', 'match', 'both'); <br />
// Produces: WHERE title LIKE '%match%' </code> </li>
+If you do not want to use the wildcard (%) you can pass to the optional third argument the option 'none'.
+
+<code>
+ $this-&gt;db-&gt;like('title', 'match', 'none'); <br />
+// Produces: WHERE title LIKE 'match'
+</code>
+
<li><strong>Associative array method:</strong>
<code>
@@ -794,7 +800,6 @@ $query = $this->db->get();</code>
<p class="important"><strong>Note:</strong> Method chaining only works with PHP 5.</p>
<a name="caching">&nbsp;</a>
-
<h1>Active Record Caching</h1>
<p>While not &quot;true&quot; caching, Active Record enables you to save (or &quot;cache&quot;) certain parts of your queries for reuse at a later point in your script's execution. Normally, when an Active Record call is completed, all stored information is reset for the next call. With caching, you can prevent this reset, and reuse information easily.</p>