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/changelog.html | 1 + user_guide/database/active_record.html | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) 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
  • Added a check for NULL fields in the MySQL database backup utility.
  • Documented the timezones() function in the Date Helper.
  • Documented unset_userdata in the Session class.
  • +
  • Documented distinct() in Active Record.
  • Changed the behaviour of custom callbacks so that they no longer trigger the "required" rule.
  • Added a few additional mime type variations for CSV.
  • Added strip_quotes() function to string helper.
  • 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