From c08f27b471816493900702229eb105b0ec117706 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 14 Sep 2015 14:03:39 +0300 Subject: Fix #4032 --- user_guide_src/source/database/db_driver_reference.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'user_guide_src/source/database') diff --git a/user_guide_src/source/database/db_driver_reference.rst b/user_guide_src/source/database/db_driver_reference.rst index 005e6b3dc..ea692515c 100644 --- a/user_guide_src/source/database/db_driver_reference.rst +++ b/user_guide_src/source/database/db_driver_reference.rst @@ -124,8 +124,8 @@ This article is intended to be a reference for them. Enable/disable transaction "strict" mode. When strict mode is enabled, if you are running multiple - groups of transactions and one group fails, all groups - will be rolled back. + groups of transactions and one group fails, all subsequent + groups will be rolled back. If strict mode is disabled, each group is treated autonomously, meaning a failure of one group will not -- cgit v1.2.3-24-g4f1b From d2985b9a63a9bcb016ff7f8ce7430ec08b468f6a Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 22 Sep 2015 18:01:05 +0300 Subject: [ci skip] Remove an example from DB docs Users shouldn't be encouraged to use num_rows() that way ... We had already decided on this awhile ago, this example just slipped through. --- user_guide_src/source/database/examples.rst | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'user_guide_src/source/database') diff --git a/user_guide_src/source/database/examples.rst b/user_guide_src/source/database/examples.rst index 8b3cc4701..5fd7fccfa 100644 --- a/user_guide_src/source/database/examples.rst +++ b/user_guide_src/source/database/examples.rst @@ -55,23 +55,6 @@ Standard Query With Multiple Results (Array Version) The above result_array() function returns an array of standard array indexes. Example: $row['title'] -Testing for Results -=================== - -If you run queries that might **not** produce a result, you are -encouraged to test for a result first using the num_rows() function:: - - $query = $this->db->query("YOUR QUERY"); - if ($query->num_rows() > 0) - { - foreach ($query->result() as $row) - { - echo $row->title; - echo $row->name; - echo $row->body; - } - } - Standard Query With Single Result ================================= -- cgit v1.2.3-24-g4f1b From 97d5154c1b50e8c0e73b17355d20126dfaf043fa Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 19 Oct 2015 11:28:11 +0300 Subject: [ci skip] Fix docs about QB caching It doesn't support set() ... Related: #4175 --- user_guide_src/source/database/query_builder.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide_src/source/database') diff --git a/user_guide_src/source/database/query_builder.rst b/user_guide_src/source/database/query_builder.rst index 9c3ff306f..5d9ae4592 100644 --- a/user_guide_src/source/database/query_builder.rst +++ b/user_guide_src/source/database/query_builder.rst @@ -1018,7 +1018,7 @@ Here's a usage example:: .. note:: The following statements can be cached: select, from, join, - where, like, group_by, having, order_by, set + where, like, group_by, having, order_by *********************** -- cgit v1.2.3-24-g4f1b From a7d4abaedc27497d570ae06ddc9cdde05930ec15 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 19 Oct 2015 14:39:44 +0300 Subject: Fix #4171 and a number of other transaction bugs --- user_guide_src/source/database/db_driver_reference.rst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'user_guide_src/source/database') diff --git a/user_guide_src/source/database/db_driver_reference.rst b/user_guide_src/source/database/db_driver_reference.rst index ea692515c..8fc26c01b 100644 --- a/user_guide_src/source/database/db_driver_reference.rst +++ b/user_guide_src/source/database/db_driver_reference.rst @@ -140,13 +140,15 @@ This article is intended to be a reference for them. .. php:method:: trans_start([$test_mode = FALSE]) :param bool $test_mode: Test mode flag - :rtype: void + :returns: TRUE on success, FALSE on failure + :rtype: bool Start a transaction. .. php:method:: trans_complete() - :rtype: void + :returns: TRUE on success, FALSE on failure + :rtype: bool Complete Transaction. -- cgit v1.2.3-24-g4f1b From 01fb0d44167196ab0cb5bc0a3f1385204f932992 Mon Sep 17 00:00:00 2001 From: Craig Johnson Date: Thu, 12 Nov 2015 23:44:17 +0530 Subject: Grammar correction in database configuration guide "it" changed to "in" on line 10. "in" seems like the correct word to be used there. Small change. --- user_guide_src/source/database/configuration.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide_src/source/database') diff --git a/user_guide_src/source/database/configuration.rst b/user_guide_src/source/database/configuration.rst index 8026be63a..e231a7d6a 100644 --- a/user_guide_src/source/database/configuration.rst +++ b/user_guide_src/source/database/configuration.rst @@ -7,7 +7,7 @@ connection values (username, password, database name, etc.). The config file is located at application/config/database.php. You can also set database connection values for specific :doc:`environments <../libraries/config>` by placing **database.php** -it the respective environment config folder. +in the respective environment config folder. The config settings are stored in a multi-dimensional array with this prototype:: -- cgit v1.2.3-24-g4f1b From b3847796666c8466dcfafaddbda1f13b4acf605e Mon Sep 17 00:00:00 2001 From: Craig Johnson Date: Thu, 12 Nov 2015 23:44:17 +0530 Subject: Grammar correction in database configuration guide "it" changed to "in" on line 10. "in" seems like the correct word to be used there. Small change. --- user_guide_src/source/database/configuration.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide_src/source/database') diff --git a/user_guide_src/source/database/configuration.rst b/user_guide_src/source/database/configuration.rst index 8026be63a..e231a7d6a 100644 --- a/user_guide_src/source/database/configuration.rst +++ b/user_guide_src/source/database/configuration.rst @@ -7,7 +7,7 @@ connection values (username, password, database name, etc.). The config file is located at application/config/database.php. You can also set database connection values for specific :doc:`environments <../libraries/config>` by placing **database.php** -it the respective environment config folder. +in the respective environment config folder. The config settings are stored in a multi-dimensional array with this prototype:: -- cgit v1.2.3-24-g4f1b From 62a106e277e53a99346314cc10480e549225b08c Mon Sep 17 00:00:00 2001 From: Phil Scherer Date: Tue, 8 Dec 2015 18:06:11 -0500 Subject: Fix mismatched brackets in documentation Sphinx generates incomplete/incorrect HTML output because there are mismatched brackets in the documentation. Signed-off-by: Phil Scherer --- user_guide_src/source/database/db_driver_reference.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide_src/source/database') diff --git a/user_guide_src/source/database/db_driver_reference.rst b/user_guide_src/source/database/db_driver_reference.rst index 8fc26c01b..1e436ede1 100644 --- a/user_guide_src/source/database/db_driver_reference.rst +++ b/user_guide_src/source/database/db_driver_reference.rst @@ -83,7 +83,7 @@ This article is intended to be a reference for them. Database version number. - .. php:method:: query($sql[, $binds = FALSE[, $return_object = NULL]]]) + .. php:method:: query($sql[, $binds = FALSE[, $return_object = NULL]]) :param string $sql: The SQL statement to execute :param array $binds: An array of binding data -- cgit v1.2.3-24-g4f1b From 3e75ff6050fd86816601a11effc2932ecd81ebf7 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 10 Dec 2015 13:28:19 +0200 Subject: Merge pull request #4304 from scherepn/fix-doc-build-errors [ci skip] Fix mismatched brackets in documentation --- user_guide_src/source/database/db_driver_reference.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide_src/source/database') diff --git a/user_guide_src/source/database/db_driver_reference.rst b/user_guide_src/source/database/db_driver_reference.rst index 8fc26c01b..1e436ede1 100644 --- a/user_guide_src/source/database/db_driver_reference.rst +++ b/user_guide_src/source/database/db_driver_reference.rst @@ -83,7 +83,7 @@ This article is intended to be a reference for them. Database version number. - .. php:method:: query($sql[, $binds = FALSE[, $return_object = NULL]]]) + .. php:method:: query($sql[, $binds = FALSE[, $return_object = NULL]]) :param string $sql: The SQL statement to execute :param array $binds: An array of binding data -- cgit v1.2.3-24-g4f1b From 97ecf2fcce8e3133e286e16de1b49612235a8dcf Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sat, 12 Dec 2015 17:26:28 +0200 Subject: Complete the proposed changes from PR #4300 --- user_guide_src/source/database/db_driver_reference.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src/source/database') diff --git a/user_guide_src/source/database/db_driver_reference.rst b/user_guide_src/source/database/db_driver_reference.rst index 1e436ede1..f0a438883 100644 --- a/user_guide_src/source/database/db_driver_reference.rst +++ b/user_guide_src/source/database/db_driver_reference.rst @@ -19,6 +19,7 @@ This article is intended to be a reference for them. :returns: TRUE on success, FALSE on failure :rtype: bool + :throws: RuntimeException In case of failure Initialize database settings, establish a connection to the database. -- cgit v1.2.3-24-g4f1b From 85bc9fc53e4c3e46b2f4e1b1eac7e2828d4869e6 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 14 Dec 2015 17:56:14 +0200 Subject: Change DB charset handling Close #4311 --- user_guide_src/source/database/db_driver_reference.rst | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'user_guide_src/source/database') diff --git a/user_guide_src/source/database/db_driver_reference.rst b/user_guide_src/source/database/db_driver_reference.rst index f0a438883..75d1538bd 100644 --- a/user_guide_src/source/database/db_driver_reference.rst +++ b/user_guide_src/source/database/db_driver_reference.rst @@ -17,8 +17,7 @@ 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 @@ -62,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 -- cgit v1.2.3-24-g4f1b From f51ef09e34f049911af99332f937ebaf723c129e Mon Sep 17 00:00:00 2001 From: Kristian Matthews Date: Sun, 31 Jan 2016 15:54:30 +0000 Subject: Added Unique Field Attribute Doc Signed-off-by: Kristian Matthews --- user_guide_src/source/database/forge.rst | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'user_guide_src/source/database') diff --git a/user_guide_src/source/database/forge.rst b/user_guide_src/source/database/forge.rst index 646e3a56e..cb5c35662 100644 --- a/user_guide_src/source/database/forge.rst +++ b/user_guide_src/source/database/forge.rst @@ -97,6 +97,7 @@ Additionally, the following key/values can be used: - auto_increment/true : generates an auto_increment flag on the field. Note that the field type must be a type that supports this, such as integer. +- unique/false : to generate a unique key for the field definition. :: @@ -110,6 +111,7 @@ Additionally, the following key/values can be used: 'blog_title' => array( 'type' => 'VARCHAR', 'constraint' => '100', + 'unique' => TRUE, ), 'blog_author' => array( 'type' =>'VARCHAR', @@ -175,14 +177,14 @@ below is for MySQL. $this->dbforge->add_key('blog_id', TRUE); // gives PRIMARY KEY `blog_id` (`blog_id`) - + $this->dbforge->add_key('blog_id', TRUE); $this->dbforge->add_key('site_id', TRUE); // gives PRIMARY KEY `blog_id_site_id` (`blog_id`, `site_id`) - + $this->dbforge->add_key('blog_name'); // gives KEY `blog_name` (`blog_name`) - + $this->dbforge->add_key(array('blog_name', 'blog_label')); // gives KEY `blog_name_blog_label` (`blog_name`, `blog_label`) @@ -261,7 +263,7 @@ number of additional fields. $fields = array( 'preferences' => array('type' => 'TEXT') ); - $this->dbforge->add_column('table_name', $fields); + $this->dbforge->add_column('table_name', $fields); // Executes: ALTER TABLE table_name ADD preferences TEXT If you are using MySQL or CUBIRD, then you can take advantage of their -- cgit v1.2.3-24-g4f1b From ea07f04725c56730d4b99d5f215d6e09edb54df6 Mon Sep 17 00:00:00 2001 From: Kristian Matthews Date: Mon, 1 Feb 2016 18:06:17 +0000 Subject: Changed Unique Value Changed unique value from false to true. Signed-off-by: Kristian Matthews --- user_guide_src/source/database/forge.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide_src/source/database') diff --git a/user_guide_src/source/database/forge.rst b/user_guide_src/source/database/forge.rst index cb5c35662..5af4f2248 100644 --- a/user_guide_src/source/database/forge.rst +++ b/user_guide_src/source/database/forge.rst @@ -97,7 +97,7 @@ Additionally, the following key/values can be used: - auto_increment/true : generates an auto_increment flag on the field. Note that the field type must be a type that supports this, such as integer. -- unique/false : to generate a unique key for the field definition. +- unique/true : to generate a unique key for the field definition. :: -- cgit v1.2.3-24-g4f1b From e8bcc9eeb4ccbbea78442275c646de21aaaa6594 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 2 Feb 2016 14:01:50 +0200 Subject: Merge pull request #4419 from EpicKris/hotfix/database-forge-unique-doc [ci skip] Added docs for UNIQUE keys in DBForge --- user_guide_src/source/database/forge.rst | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'user_guide_src/source/database') diff --git a/user_guide_src/source/database/forge.rst b/user_guide_src/source/database/forge.rst index 646e3a56e..5af4f2248 100644 --- a/user_guide_src/source/database/forge.rst +++ b/user_guide_src/source/database/forge.rst @@ -97,6 +97,7 @@ Additionally, the following key/values can be used: - auto_increment/true : generates an auto_increment flag on the field. Note that the field type must be a type that supports this, such as integer. +- unique/true : to generate a unique key for the field definition. :: @@ -110,6 +111,7 @@ Additionally, the following key/values can be used: 'blog_title' => array( 'type' => 'VARCHAR', 'constraint' => '100', + 'unique' => TRUE, ), 'blog_author' => array( 'type' =>'VARCHAR', @@ -175,14 +177,14 @@ below is for MySQL. $this->dbforge->add_key('blog_id', TRUE); // gives PRIMARY KEY `blog_id` (`blog_id`) - + $this->dbforge->add_key('blog_id', TRUE); $this->dbforge->add_key('site_id', TRUE); // gives PRIMARY KEY `blog_id_site_id` (`blog_id`, `site_id`) - + $this->dbforge->add_key('blog_name'); // gives KEY `blog_name` (`blog_name`) - + $this->dbforge->add_key(array('blog_name', 'blog_label')); // gives KEY `blog_name_blog_label` (`blog_name`, `blog_label`) @@ -261,7 +263,7 @@ number of additional fields. $fields = array( 'preferences' => array('type' => 'TEXT') ); - $this->dbforge->add_column('table_name', $fields); + $this->dbforge->add_column('table_name', $fields); // Executes: ALTER TABLE table_name ADD preferences TEXT If you are using MySQL or CUBIRD, then you can take advantage of their -- cgit v1.2.3-24-g4f1b From 105a48bbfc97be5902dbe80f90f8936fe174c9cf Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 4 Feb 2016 15:45:10 +0200 Subject: Add batch_size param to insert_batch(), update_batch() This should resolve #42 --- user_guide_src/source/database/query_builder.rst | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'user_guide_src/source/database') diff --git a/user_guide_src/source/database/query_builder.rst b/user_guide_src/source/database/query_builder.rst index 5d9ae4592..3135f76da 100644 --- a/user_guide_src/source/database/query_builder.rst +++ b/user_guide_src/source/database/query_builder.rst @@ -1433,15 +1433,20 @@ Class Reference Compiles and executes an INSERT statement. - .. php:method:: insert_batch([$table = ''[, $set = NULL[, $escape = NULL]]]) + .. php:method:: insert_batch($table[, $set = NULL[, $escape = NULL[, $batch_size = 100]]]) :param string $table: Table name :param array $set: Data to insert :param bool $escape: Whether to escape values and identifiers + :param int $batch_size: Count of rows to insert at once :returns: Number of rows inserted or FALSE on failure :rtype: mixed - Compiles and executes batch INSERT statements. + Compiles and executes batch ``INSERT`` statements. + + .. note:: When more than ``$batch_size`` rows are provided, multiple + ``INSERT`` queries will be executed, each trying to insert + up to ``$batch_size`` rows. .. php:method:: set_insert_batch($key[, $value = ''[, $escape = NULL]]) @@ -1464,15 +1469,20 @@ Class Reference Compiles and executes an UPDATE statement. - .. php:method:: update_batch([$table = ''[, $set = NULL[, $value = NULL]]]) + .. php:method:: update_batch($table[, $set = NULL[, $value = NULL[, $batch_size = 100]]]) :param string $table: Table name :param array $set: Field name, or an associative array of field/value pairs :param string $value: Field value, if $set is a single field + :param int $batch_size: Count of conditions to group in a single query :returns: Number of rows updated or FALSE on failure :rtype: mixed - Compiles and executes batch UPDATE statements. + Compiles and executes batch ``UPDATE`` statements. + + .. note:: When more than ``$batch_size`` field/value pairs are provided, + multiple queries will be executed, each handling up to + ``$batch_size`` field/value pairs. .. php:method:: set_update_batch($key[, $value = ''[, $escape = NULL]]) -- cgit v1.2.3-24-g4f1b From 86d2ec40b47f885a6d7e28b9dd519fac3332e7ae Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 17 Feb 2016 19:19:56 +0200 Subject: [ci skip] Update docs to reflect escape_like_str() usage with ESCAPE '\!' Closes #4462 --- user_guide_src/source/database/db_driver_reference.rst | 7 +++++++ user_guide_src/source/database/queries.rst | 8 +++++++- 2 files changed, 14 insertions(+), 1 deletion(-) (limited to 'user_guide_src/source/database') diff --git a/user_guide_src/source/database/db_driver_reference.rst b/user_guide_src/source/database/db_driver_reference.rst index 1e436ede1..1ecd38968 100644 --- a/user_guide_src/source/database/db_driver_reference.rst +++ b/user_guide_src/source/database/db_driver_reference.rst @@ -234,6 +234,13 @@ This article is intended to be a reference for them. and ``_`` wildcard characters, so that they don't cause false-positives in LIKE conditions. + .. important:: The ``escape_like_str()`` method uses '!' (exclamation mark) + to escape special characters for *LIKE* conditions. Because this + method escapes partial strings that you would wrap in quotes + yourself, it cannot automatically add the ``ESCAPE '!'`` + condition for you, and so you'll have to manually do that. + + .. php:method:: primary($table) :param string $table: Table name diff --git a/user_guide_src/source/database/queries.rst b/user_guide_src/source/database/queries.rst index 43a0a30bf..d4ffd16cf 100644 --- a/user_guide_src/source/database/queries.rst +++ b/user_guide_src/source/database/queries.rst @@ -123,7 +123,13 @@ this: $search = '20% raise'; $sql = "SELECT id FROM table WHERE column LIKE '%" . - $this->db->escape_like_str($search)."%'"; + $this->db->escape_like_str($search)."%' ESCAPE '!'"; + +.. important:: The ``escape_like_str()`` method uses '!' (exclamation mark) + to escape special characters for *LIKE* conditions. Because this + method escapes partial strings that you would wrap in quotes + yourself, it cannot automatically add the ``ESCAPE '!'`` + condition for you, and so you'll have to manually do that. ************** -- cgit v1.2.3-24-g4f1b From 19ca6442222a316ca2400252a8917426046a3eda Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 22 Jul 2016 15:56:10 +0300 Subject: [ci skip] Add affected_rows() to db reference docs --- user_guide_src/source/database/db_driver_reference.rst | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'user_guide_src/source/database') diff --git a/user_guide_src/source/database/db_driver_reference.rst b/user_guide_src/source/database/db_driver_reference.rst index 1ecd38968..aaca90840 100644 --- a/user_guide_src/source/database/db_driver_reference.rst +++ b/user_guide_src/source/database/db_driver_reference.rst @@ -116,6 +116,15 @@ This article is intended to be a reference for them. for use when you don't need to get a result object or to just send a query to the database and not care for the result. + .. php:method:: affected_rows() + :returns: Number of rows affected + :rtype: int + + Returns the number of rows *changed* by the last executed query. + + Useful for checking how much rows were created, updated or deleted + during the last executed query. + .. php:method:: trans_strict([$mode = TRUE]) :param bool $mode: Strict mode flag -- cgit v1.2.3-24-g4f1b From 850a3c91a191256967d6fc81dda26a7c8ff258c0 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 26 Jul 2016 20:12:06 +0300 Subject: [ci skip] Minor documentation fixes --- user_guide_src/source/database/db_driver_reference.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide_src/source/database') diff --git a/user_guide_src/source/database/db_driver_reference.rst b/user_guide_src/source/database/db_driver_reference.rst index aaca90840..1f036cd77 100644 --- a/user_guide_src/source/database/db_driver_reference.rst +++ b/user_guide_src/source/database/db_driver_reference.rst @@ -117,6 +117,7 @@ This article is intended to be a reference for them. just send a query to the database and not care for the result. .. php:method:: affected_rows() + :returns: Number of rows affected :rtype: int -- cgit v1.2.3-24-g4f1b From 777bb986d9e252dcc4dde3c76c03b0e0c7c1f8ef Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 24 Oct 2016 10:11:22 +0300 Subject: [ci skip] Update docs on trans_off() --- user_guide_src/source/database/transactions.rst | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'user_guide_src/source/database') diff --git a/user_guide_src/source/database/transactions.rst b/user_guide_src/source/database/transactions.rst index 2e6d4b477..e25b8ed14 100644 --- a/user_guide_src/source/database/transactions.rst +++ b/user_guide_src/source/database/transactions.rst @@ -75,12 +75,11 @@ debugging is turned off, you can manage your own errors like this:: // generate an error... or use the log_message() function to log your error } -Enabling Transactions -===================== +Disabling Transactions +====================== -Transactions are enabled automatically the moment you use -$this->db->trans_start(). If you would like to disable transactions you -can do so using $this->db->trans_off():: +If you would like to disable transactions you can do so using +``$this->db->trans_off()``:: $this->db->trans_off(); @@ -88,8 +87,9 @@ can do so using $this->db->trans_off():: $this->db->query('AN SQL QUERY...'); $this->db->trans_complete(); -When transactions are disabled, your queries will be auto-commited, just -as they are when running queries without transactions. +When transactions are disabled, your queries will be auto-commited, just as +they are when running queries without transactions, practically ignoring +any calls to ``trans_start()``, ``trans_complete()``, etc. Test Mode ========= -- cgit v1.2.3-24-g4f1b From 24fedeb2075194f0da475f45f400a0866d9577f9 Mon Sep 17 00:00:00 2001 From: klemens Date: Mon, 16 Jan 2017 21:01:58 +0100 Subject: spelling fixes --- user_guide_src/source/database/queries.rst | 2 +- user_guide_src/source/database/transactions.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'user_guide_src/source/database') diff --git a/user_guide_src/source/database/queries.rst b/user_guide_src/source/database/queries.rst index d4ffd16cf..f626f1e83 100644 --- a/user_guide_src/source/database/queries.rst +++ b/user_guide_src/source/database/queries.rst @@ -165,7 +165,7 @@ Handling Errors **$this->db->error();** -If you need to get the last error that has occured, the error() method +If you need to get the last error that has occurred, the error() method will return an array containing its code and message. Here's a quick example:: diff --git a/user_guide_src/source/database/transactions.rst b/user_guide_src/source/database/transactions.rst index e25b8ed14..cfd6a566d 100644 --- a/user_guide_src/source/database/transactions.rst +++ b/user_guide_src/source/database/transactions.rst @@ -87,7 +87,7 @@ If you would like to disable transactions you can do so using $this->db->query('AN SQL QUERY...'); $this->db->trans_complete(); -When transactions are disabled, your queries will be auto-commited, just as +When transactions are disabled, your queries will be auto-committed, just as they are when running queries without transactions, practically ignoring any calls to ``trans_start()``, ``trans_complete()``, etc. -- cgit v1.2.3-24-g4f1b