From e54e3d2786b76266e6b6dde481cc493ba002faae Mon Sep 17 00:00:00 2001 From: Derek Allard Date: Wed, 19 Dec 2007 15:53:44 +0000 Subject: where_in_or became or_where_in(), where_not_in_or() became or_where_not_in() for consistency Added not_like() and or_not_like() --- user_guide/database/active_record.html | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 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 cf8ad469f..d938b5dff 100644 --- a/user_guide/database/active_record.html +++ b/user_guide/database/active_record.html @@ -18,7 +18,6 @@ - @@ -274,7 +273,7 @@ $this->db->or_where('id >', $id); $this->db->where_in('username', $names);
// Produces: AND WHERE username IN ('Frank', 'Todd', 'James')

-

$this->db->where_in_or();

+

$this->db->or_where_in();

Generates a WHERE field IN ('item', 'item') SQL query joined with OR if appropriate

$names = array('Frank', 'Todd', 'James');
@@ -288,7 +287,7 @@ $this->db->or_where('id >', $id); $this->db->where_not_in('username', $names);
// Produces: AND WHERE username NOT IN ('Frank', 'Todd', 'James')

-

$this->db->where_not_in_or();

+

$this->db->or_where_not_in();

Generates a WHERE field NOT IN ('item', 'item') SQL query joined with OR if appropriate

$names = array('Frank', 'Todd', 'James');
@@ -338,7 +337,7 @@ $this->db->or_where('id >', $id);

This function is identical to the one above, except that multiple instances are joined by OR:

-$this->db->like('title', $match);
+$this->db->like('title', 'match');
$this->db->or_like('body', $match);

// WHERE title LIKE '%match%' OR body LIKE '%match%'
@@ -347,6 +346,17 @@ $this->db->or_like('body', $match);

Note: or_like() was formerly known as orlike(), which has been deprecated.

+

$this->db->not_like();

+

This function is identical to like(), except that it generates NOT LIKE statements:

+ $this->db->not_like('title', 'match');
+
+// WHERE title NOT LIKE '%match%
+

$this->db->or_not_like();

+

This function is identical to not_like(), except that multiple instances are joined by OR:

+ $this->db->like('title', 'match');
+$this->db->or_not_like('body', 'match');
+
+// WHERE title LIKE '%match% OR body NOT LIKE 'match'

$this->db->group_by();

Permits you to write the GROUP BY portion of your query:

-- cgit v1.2.3-24-g4f1b