summaryrefslogtreecommitdiffstats
path: root/user_guide_src/source/database
diff options
context:
space:
mode:
Diffstat (limited to 'user_guide_src/source/database')
-rw-r--r--user_guide_src/source/database/db_driver_reference.rst17
-rw-r--r--user_guide_src/source/database/query_builder.rst46
2 files changed, 51 insertions, 12 deletions
diff --git a/user_guide_src/source/database/db_driver_reference.rst b/user_guide_src/source/database/db_driver_reference.rst
index 1f036cd77..c240526e0 100644
--- a/user_guide_src/source/database/db_driver_reference.rst
+++ b/user_guide_src/source/database/db_driver_reference.rst
@@ -17,8 +17,8 @@ This article is intended to be a reference for them.
.. php:method:: initialize()
- :returns: TRUE on success, FALSE on failure
- :rtype: bool
+ :rtype: void
+ :throws: RuntimeException In case of failure
Initialize database settings, establish a connection to
the database.
@@ -61,14 +61,6 @@ This article is intended to be a reference for them.
Select / switch the current database.
- .. php:method:: db_set_charset($charset)
-
- :param string $charset: Character set name
- :returns: TRUE on success, FALSE on failure
- :rtype: bool
-
- Set client character set.
-
.. php:method:: platform()
:returns: Platform name
@@ -313,9 +305,10 @@ This article is intended to be a reference for them.
Gets a list containing field data about a table.
- .. php:method:: escape_identifiers($item)
+ .. php:method:: escape_identifiers($item, $split = TRUE)
:param mixed $item: The item or array of items to escape
+ :param bool $split: Whether to split identifiers when a dot is encountered
:returns: The input item(s), escaped
:rtype: mixed
@@ -436,4 +429,4 @@ This article is intended to be a reference for them.
insert the table prefix (if it exists) in the proper
position, and escape only the correct identifiers.
- This method is used extensively by the Query Builder class. \ No newline at end of file
+ This method is used extensively by the Query Builder class.
diff --git a/user_guide_src/source/database/query_builder.rst b/user_guide_src/source/database/query_builder.rst
index 3c72218cd..a33c7073b 100644
--- a/user_guide_src/source/database/query_builder.rst
+++ b/user_guide_src/source/database/query_builder.rst
@@ -453,6 +453,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
****************