summaryrefslogtreecommitdiffstats
path: root/user_guide/database/configuration.html
diff options
context:
space:
mode:
authorphilsturgeon <devnull@localhost>2011-06-15 17:00:03 +0200
committerphilsturgeon <devnull@localhost>2011-06-15 17:00:03 +0200
commit0fe54dbaf89a8337d27b9203f74891cf1a799715 (patch)
treece168b3c24788e5a4a31e0cc65b64f54e25ee8a2 /user_guide/database/configuration.html
parent3a43c7adae7737d68a0eeca663cc2dd3fc5b0cf3 (diff)
parent3ef65bd7491f847fecdab1acc9687f0e90eee09b (diff)
Merged Alex Bilbies MSSQL changes.
Diffstat (limited to 'user_guide/database/configuration.html')
-rw-r--r--user_guide/database/configuration.html20
1 files changed, 10 insertions, 10 deletions
diff --git a/user_guide/database/configuration.html b/user_guide/database/configuration.html
index d71cd34db..b34705410 100644
--- a/user_guide/database/configuration.html
+++ b/user_guide/database/configuration.html
@@ -28,7 +28,7 @@
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
-<td><h1>CodeIgniter User Guide Version 2.0.0</h1></td>
+<td><h1>CodeIgniter User Guide Version 2.0.2</h1></td>
<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
</tr>
</table>
@@ -74,7 +74,7 @@ $db['default']['dbprefix'] = "";<br />
$db['default']['pconnect'] = TRUE;<br />
$db['default']['db_debug'] = FALSE;<br />
$db['default']['cache_on'] = FALSE;<br />
-$db['default']['cachedir'] = &quot;&quot;;<br />
+$db['default']['cachedir'] = &quot;&quot;;<br />
$db['default']['char_set'] = "utf8";<br />
$db['default']['dbcollat'] = "utf8_general_ci";<br />
$db['default']['swap_pre'] = "";<br />
@@ -82,7 +82,7 @@ $db['default']['autoinit'] = TRUE;<br />
$db['default']['stricton'] = FALSE;</code>
<p>The reason we use a multi-dimensional array rather than a more simple one is to permit you to optionally store
-multiple sets of connection values. If, for example, you run multiple environments (development, production, test, etc.)
+multiple sets of connection values. If, for example, you run multiple environments (development, production, test, etc.)
under a single installation, you can set up a connection group for each, then switch between groups as needed.
For example, to set up a "test" environment you would do this:</p>
@@ -95,7 +95,7 @@ $db['test']['dbprefix'] = "";<br />
$db['test']['pconnect'] = TRUE;<br />
$db['test']['db_debug'] = FALSE;<br />
$db['test']['cache_on'] = FALSE;<br />
-$db['test']['cachedir'] = &quot;&quot;;<br />
+$db['test']['cachedir'] = &quot;&quot;;<br />
$db['test']['char_set'] = "utf8";<br />
$db['test']['dbcollat'] = "utf8_general_ci";<br />
$db['test']['swap_pre'] = "";<br />
@@ -107,7 +107,7 @@ $db['test']['stricton'] = FALSE;</code>
<code>$active_group = "test";</code>
-<p>Note: The name "test" is arbitrary. It can be anything you want. By default we've used the word "default"
+<p>Note: The name "test" is arbitrary. It can be anything you want. By default we've used the word "default"
for the primary connection, but it too can be renamed to something more relevant to your project.</p>
<h3>Active Record</h3>
@@ -126,21 +126,21 @@ for the primary connection, but it too can be renamed to something more relevant
<li><strong>password</strong> - The password used to connect to the database.</li>
<li><strong>database</strong> - The name of the database you want to connect to.</li>
<li><strong>dbdriver</strong> - The database type. ie: mysql, postgres, odbc, etc. Must be specified in lower case.</li>
-<li><strong>dbprefix</strong> - An optional table prefix which will added to the table name when running <a href="active_record.html">Active Record</a> queries. This permits multiple CodeIgniter installations to share one database.</li>
+<li><strong>dbprefix</strong> - An optional table prefix which will added to the table name when running <a href="active_record.html">Active Record</a> queries. This permits multiple CodeIgniter installations to share one database.</li>
<li><strong>pconnect</strong> - TRUE/FALSE (boolean) - Whether to use a persistent connection.</li>
<li><strong>db_debug</strong> - TRUE/FALSE (boolean) - Whether database errors should be displayed.</li>
<li><strong>cache_on</strong> - TRUE/FALSE (boolean) - Whether database query caching is enabled, see also <a href="caching.html">Database Caching Class</a>.</li>
<li><strong>cachedir</strong> - The absolute server path to your database query cache directory.</li>
<li><strong>char_set</strong> - The character set used in communicating with the database.</li>
-<li><strong>dbcollat</strong> - The character collation used in communicating with the database.</li>
-<li><strong>swap_pre</strong> - A default table prefix that should be swapped with <var>dbprefix</var>. This is useful for distributed applications where you might run manually written queries, and need the prefix to still be customizable by the end user.</li>
+<li><strong>dbcollat</strong> - The character collation used in communicating with the database. <p class="important"><strong>Note:</strong> For MySQL and MySQLi databases, this setting is only used as a backup if your server is running PHP &lt; 5.2.3 or MySQL &lt; 5.0.7. There is an incompatibility in PHP with mysql_real_escape_string() which can make your site vulnerable to SQL injection if you are using a multi-byte character set and are running versions lower than these. Sites using Latin-1 or UTF-8 database character set and collation are unaffected.</p></li>
+<li><strong>swap_pre</strong> - A default table prefix that should be swapped with <var>dbprefix</var>. This is useful for distributed applications where you might run manually written queries, and need the prefix to still be customizable by the end user.</li>
<li><strong>autoinit</strong> - Whether or not to automatically connect to the database when the library loads. If set to false, the connection will take place prior to executing the first query.</li>
<li><strong>stricton</strong> - TRUE/FALSE (boolean) - Whether to force "Strict Mode" connections, good for ensuring strict SQL while developing an application.</li>
-<li><strong>port</strong> - The database port number. To use this value you have to add a line to the database config array.<code>$db['default']['port'] = 5432;</code>
+<li><strong>port</strong> - The database port number. To use this value you have to add a line to the database config array.<code>$db['default']['port'] = 5432;</code>
</ul>
<p class="important"><strong>Note:</strong> Depending on what database platform you are using (MySQL, Postgres, etc.)
-not all values will be needed. For example, when using SQLite you will not need to supply a username or password, and
+not all values will be needed. For example, when using SQLite you will not need to supply a username or password, and
the database name will be the path to your database file. The information above assumes you are using MySQL.</p>