summaryrefslogtreecommitdiffstats
path: root/user_guide_src/source
diff options
context:
space:
mode:
Diffstat (limited to 'user_guide_src/source')
-rw-r--r--user_guide_src/source/changelog.rst1
-rw-r--r--user_guide_src/source/database/helpers.rst27
-rw-r--r--user_guide_src/source/general/profiling.rst6
3 files changed, 20 insertions, 14 deletions
diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst
index 7d6819f7f..d5e560f5b 100644
--- a/user_guide_src/source/changelog.rst
+++ b/user_guide_src/source/changelog.rst
@@ -160,6 +160,7 @@ Release Date: Not Released
- Added support for SQLite3 database driver.
- Added Interbase/Firebird database support via the *ibase* driver.
- Added ODBC support for ``create_database()``, ``drop_database()`` and ``drop_table()`` in :doc:`Database Forge <database/forge>`.
+ - Added **save_queries** configuration setting to *application/config/database.php* (defaults to ``TRUE``).
- :doc:`Query Builder <database/query_builder>` changes include:
diff --git a/user_guide_src/source/database/helpers.rst b/user_guide_src/source/database/helpers.rst
index e8a5ac801..77bf1b5d2 100644
--- a/user_guide_src/source/database/helpers.rst
+++ b/user_guide_src/source/database/helpers.rst
@@ -3,7 +3,7 @@ Query Helper Functions
######################
$this->db->insert_id()
-=======================
+======================
The insert ID number when performing database inserts.
@@ -12,7 +12,7 @@ The insert ID number when performing database inserts.
appropriate sequence to check for the insert id.
$this->db->affected_rows()
-===========================
+==========================
Displays the number of affected rows, when doing "write" type queries
(insert, update, etc.).
@@ -22,8 +22,8 @@ Displays the number of affected rows, when doing "write" type queries
affected rows. By default this hack is enabled but it can be turned off
in the database driver file.
-$this->db->count_all();
-========================
+$this->db->count_all()
+======================
Permits you to determine the number of rows in a particular table.
Submit the table name in the first parameter. Example::
@@ -47,8 +47,8 @@ Outputs the database version you are running::
echo $this->db->version();
-$this->db->last_query();
-=========================
+$this->db->last_query()
+=======================
Returns the last query that was run (the query string, not the result).
Example::
@@ -57,11 +57,12 @@ Example::
// Produces: SELECT * FROM sometable....
-The following two functions help simplify the process of writing
-database INSERTs and UPDATEs.
-$this->db->insert_string();
-============================
+.. note:: Disabling the **save_queries** setting in your database
+ configuration will render this function useless.
+
+$this->db->insert_string()
+==========================
This function simplifies the process of writing database inserts. It
returns a correctly formatted SQL insert string. Example::
@@ -77,8 +78,8 @@ array with the data to be inserted. The above example produces::
.. note:: Values are automatically escaped, producing safer queries.
-$this->db->update_string();
-============================
+$this->db->update_string()
+==========================
This function simplifies the process of writing database updates. It
returns a correctly formatted SQL update string. Example::
@@ -95,4 +96,4 @@ array with the data to be updated, and the third parameter is the
UPDATE table_name SET name = 'Rick', email = 'rick@example.com', url = 'example.com' WHERE author_id = 1 AND status = 'active'
-.. note:: Values are automatically escaped, producing safer queries.
+.. note:: Values are automatically escaped, producing safer queries. \ No newline at end of file
diff --git a/user_guide_src/source/general/profiling.rst b/user_guide_src/source/general/profiling.rst
index 6dbd0be16..f29af8102 100644
--- a/user_guide_src/source/general/profiling.rst
+++ b/user_guide_src/source/general/profiling.rst
@@ -80,4 +80,8 @@ Key Description
**session_data** Data stored in the current session TRUE
**query_toggle_count** The number of queries after which the query block will default to 25
hidden.
-======================= =================================================================== ======== \ No newline at end of file
+======================= =================================================================== ========
+
+.. note:: Disabling the **save_queries** setting in your database configuration
+ will also effectively disable profiling for database queries and render
+ the 'queries' setting above useless. \ No newline at end of file