diff options
author | Derek Allard <derek.allard@ellislab.com> | 2008-01-23 00:44:32 +0100 |
---|---|---|
committer | Derek Allard <derek.allard@ellislab.com> | 2008-01-23 00:44:32 +0100 |
commit | 3b11868b3aa56c83419d904435a5b7dfbf997063 (patch) | |
tree | fa79e092b37f32afb78c27bf13ec2cdd8ec42311 /user_guide/database | |
parent | 571e2c280a4358202dff1888055038431f032eeb (diff) |
Added $this->db->dbprefix() to manually add database prefixes.
Diffstat (limited to 'user_guide/database')
-rw-r--r-- | user_guide/database/queries.html | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/user_guide/database/queries.html b/user_guide/database/queries.html index 7e9d05d7b..19b33d5e1 100644 --- a/user_guide/database/queries.html +++ b/user_guide/database/queries.html @@ -80,6 +80,10 @@ It DOES NOT return a database result set, nor does it set the query timer, or co It simply lets you submit a query. Most users will rarely use this function.</p>
+<h1>Adding Database prefixes manually</h1>
+<p>If you have configured a database prefix and would like to add it in manually for, you can use the following.</p>
+<p><code>$this->db->dbprefix('tablename');<br />
+// outputs prefix_tablename</code></p>
<h1>Protecting identifiers</h1>
<p>In many databases it is advisable to protect table and field names - for example with backticks in MySQL. Active Record queries are automatically protected, however if you need to manually protect an identifier you can use:</p>
<p><code>$this->db->protect_identifier('table_name');</code></p>
|