From ad1171a6797dc0054381327fb26a9e9e232a639e Mon Sep 17 00:00:00 2001 From: Derek Jones Date: Wed, 10 Mar 2010 14:18:38 -0600 Subject: added swap_pre, autoinit, and stricton database configuration explanations --- user_guide/database/configuration.html | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'user_guide/database/configuration.html') diff --git a/user_guide/database/configuration.html b/user_guide/database/configuration.html index 4ef76ed14..1844aa057 100644 --- a/user_guide/database/configuration.html +++ b/user_guide/database/configuration.html @@ -78,7 +78,10 @@ $db['default']['db_debug'] = FALSE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = "";
$db['default']['char_set'] = "utf8";
-$db['default']['dbcollat'] = "utf8_general_ci"; +$db['default']['dbcollat'] = "utf8_general_ci";
+$db['default']['swap_pre'] = "";
+$db['default']['autoinit'] = TRUE;
+$db['default']['stricton'] = FALSE;

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.) @@ -96,7 +99,10 @@ $db['test']['db_debug'] = FALSE;
$db['test']['cache_on'] = FALSE;
$db['test']['cachedir'] = "";
$db['test']['char_set'] = "utf8";
-$db['test']['dbcollat'] = "utf8_general_ci"; +$db['test']['dbcollat'] = "utf8_general_ci";
+$db['test']['swap_pre'] = "";
+$db['test']['autoinit'] = TRUE;
+$db['test']['stricton'] = FALSE;

Then, to globally tell the system to use that group you would set this variable located in the config file:

@@ -129,7 +135,10 @@ for the primary connection, but it too can be renamed to something more relevant
  • cachedir - The absolute server path to your database query cache directory.
  • char_set - The character set used in communicating with the database.
  • dbcollat - The character collation used in communicating with the database.
  • -
  • port - The database port number. Currently only used with the Postgres driver. To use this value you have to add a line to the database config array.$db['default']['port'] = 5432;
  • +
  • swap_pre - A default table prefix that should be swapped with dbprefix. 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.
  • +
  • autoinit - Whether or not to automatically initialize the database.
  • +
  • stricton - TRUE/FALSE (boolean) - Whether to force "Strict Mode" connections, good for ensuring strict SQL while developing an application.
  • +
  • port - The database port number. Currently only used with the Postgres driver. To use this value you have to add a line to the database config array.$db['default']['port'] = 5432;

    Note: Depending on what database platform you are using (MySQL, Postgres, etc.) -- cgit v1.2.3-24-g4f1b