summaryrefslogtreecommitdiffstats
path: root/user_guide/database
diff options
context:
space:
mode:
authorDerek Jones <derek.jones@ellislab.com>2008-05-14 17:01:50 +0200
committerDerek Jones <derek.jones@ellislab.com>2008-05-14 17:01:50 +0200
commit97bc010749830b183fffa7c5faf29744c095864e (patch)
treec98b36a2199963ca720e2d6c819febde90edbc0f /user_guide/database
parent454fa7e0039689ca480eb6ef999d3fa753f5f875 (diff)
fixed bug #3419 where the 'database' setting for DSN connections was using the host portion of the URL instead of the path.
Added ability to set other db config values in DSN connections via query string
Diffstat (limited to 'user_guide/database')
-rw-r--r--user_guide/database/connecting.html5
1 files changed, 4 insertions, 1 deletions
diff --git a/user_guide/database/connecting.html b/user_guide/database/connecting.html
index ee2d8c08f..bc4b2e7e7 100644
--- a/user_guide/database/connecting.html
+++ b/user_guide/database/connecting.html
@@ -117,8 +117,11 @@ $this->load->database(<samp>$config</samp>);</code>
<br />
$this->load->database(<samp>$dsn</samp>);</code>
-<p>Note that if you use a DSN you will not be able to specify some of the default values like you can if you use a connection array.</p>
+<p>To override default config values when connecting with a DSN string, add the config variables as a query string.</p>
+<code>$dsn = 'dbdriver://username:password@hostname/database?char_set=utf8&amp;dbcollat=utf8_general_ci&amp;cache_on=true&amp;cachedir=/path/to/cache';<br />
+<br />
+$this->load->database(<samp>$dsn</samp>);</code>
<h2>Connecting to Multiple Databases</h2>