summaryrefslogtreecommitdiffstats
path: root/user_guide_src/source
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2017-02-21 10:39:45 +0100
committerGitHub <noreply@github.com>2017-02-21 10:39:45 +0100
commitd785553f9a4f92bba3e3fe8c44ccc8d52d5d8f15 (patch)
treeccf0e8bbadcbdea3b2a2fb1c22b2dec95f308324 /user_guide_src/source
parent9bfa0cbcc8ac42a2295f25dd3d1ecc83fd7f458a (diff)
parent3e0ad435f13179ed1c590bdeba2fbeeaa7d0f9c2 (diff)
Merge pull request #5017 from tianhe1986/develop_having_in
DB_query_builder: Adding having_in(), or_having_in(), having_not_in() and or_having_not_in()
Diffstat (limited to 'user_guide_src/source')
-rw-r--r--user_guide_src/source/database/query_builder.rst46
1 files changed, 46 insertions, 0 deletions
diff --git a/user_guide_src/source/database/query_builder.rst b/user_guide_src/source/database/query_builder.rst
index 3135f76da..2d954c7a8 100644
--- a/user_guide_src/source/database/query_builder.rst
+++ b/user_guide_src/source/database/query_builder.rst
@@ -452,6 +452,52 @@ setting it to FALSE.
Identical to having(), only separates multiple clauses with "OR".
+**$this->db->having_in()**
+
+Generates a HAVING field IN ('item', 'item') SQL query joined with AND if
+appropriate
+
+::
+
+ $names = array('Frank', 'Todd', 'James');
+ $this->db->having_in('username', $names);
+ // Produces: HAVING username IN ('Frank', 'Todd', 'James')
+
+
+**$this->db->or_having_in()**
+
+Generates a HAVING field IN ('item', 'item') SQL query joined with OR if
+appropriate
+
+::
+
+ $names = array('Frank', 'Todd', 'James');
+ $this->db->or_having_in('username', $names);
+ // Produces: OR username IN ('Frank', 'Todd', 'James')
+
+**$this->db->having_not_in()**
+
+Generates a HAVING field NOT IN ('item', 'item') SQL query joined with
+AND if appropriate
+
+::
+
+ $names = array('Frank', 'Todd', 'James');
+ $this->db->having_not_in('username', $names);
+ // Produces: HAVING username NOT IN ('Frank', 'Todd', 'James')
+
+
+**$this->db->or_having_not_in()**
+
+Generates a HAVING field NOT IN ('item', 'item') SQL query joined with OR
+if appropriate
+
+::
+
+ $names = array('Frank', 'Todd', 'James');
+ $this->db->or_having_not_in('username', $names);
+ // Produces: OR username NOT IN ('Frank', 'Todd', 'James')
+
****************
Ordering results
****************