From 032a5c0b61746e1dd82e400ad8ac639f92d3788c Mon Sep 17 00:00:00 2001 From: Derek Allard Date: Wed, 2 Jan 2008 21:51:31 +0000 Subject: Documented distinct() in Active Record. --- user_guide/database/active_record.html | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (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 e7c823fde..d43101642 100644 --- a/user_guide/database/active_record.html +++ b/user_guide/database/active_record.html @@ -370,8 +370,15 @@ $this->db->or_not_like('body', 'match');


// Produces: GROUP BY title, date -

Note: group_by() was formerly known as groupby(), which has been deprecated.

+ +

$this->db->distinct();
+

+

Adds the "DISTINCT" keyword to to a query

+

$this->db->distinct();
+ $this->db->get('table');
+
+ // Produces: SELECT DISTINCT * FROM table

$this->db->having();

Permits you to write the HAVING portion of your query:

-- cgit v1.2.3-24-g4f1b