summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDerek Allard <derek.allard@ellislab.com>2008-01-02 22:51:31 +0100
committerDerek Allard <derek.allard@ellislab.com>2008-01-02 22:51:31 +0100
commit032a5c0b61746e1dd82e400ad8ac639f92d3788c (patch)
tree0918ff50fa13058a88a5916c6e26a9c3bfeb420e
parenta0fa90b1bbb61d47bcc9bc95d983e66dfc8732dd (diff)
Documented distinct() in Active Record.
-rw-r--r--user_guide/changelog.html1
-rw-r--r--user_guide/database/active_record.html9
2 files changed, 9 insertions, 1 deletions
diff --git a/user_guide/changelog.html b/user_guide/changelog.html
index b28ec8c46..8fa74a13b 100644
--- a/user_guide/changelog.html
+++ b/user_guide/changelog.html
@@ -75,6 +75,7 @@ Change Log
<li>Added a check for NULL fields in the MySQL database backup utility.</li>
<li>Documented the <kbd>timezones()</kbd> function in the <a href="./helpers/date_helper.html">Date Helper</a>.</li>
<li>Documented unset_userdata in the <a href="./libraries/sessions.html">Session class</a>.</li>
+ <li>Documented <kbd>distinct()</kbd> in <a href="./database/active_record.html">Active Record</a>. </li>
<li>Changed the behaviour of custom callbacks so that they no longer trigger the &quot;required&quot; rule. </li>
<li>Added a few additional mime type variations for CSV.</li>
<li>Added <kbd>strip_quotes()</kbd> function to <a href="./helpers/string_helper.html">string helper</a>.</li>
diff --git a/user_guide/database/active_record.html b/user_guide/database/active_record.html
index e7c823fde..d43101642 100644
--- a/user_guide/database/active_record.html
+++ b/user_guide/database/active_record.html
@@ -370,8 +370,15 @@ $this-&gt;db-&gt;or_not_like('body', 'match'); <br />
<br />
<br />// Produces: GROUP BY title, date</code>
-
<p class="important">Note: group_by() was formerly known as groupby(), which has been deprecated. </p>
+
+<h2> $this-&gt;db-&gt;distinct();<br />
+</h2>
+<p>Adds the &quot;DISTINCT&quot; keyword to to a query</p>
+<p><code>$this-&gt;db-&gt;distinct();<br />
+ $this-&gt;db-&gt;get('table');<br />
+ <br />
+ // Produces: SELECT DISTINCT * FROM table</code></p>
<h2>$this->db->having();</h2>
<p>Permits you to write the HAVING portion of your query:</p>