summaryrefslogtreecommitdiffstats
path: root/user_guide_src/source/database/configuration.rst
diff options
context:
space:
mode:
Diffstat (limited to 'user_guide_src/source/database/configuration.rst')
-rw-r--r--user_guide_src/source/database/configuration.rst16
1 files changed, 10 insertions, 6 deletions
diff --git a/user_guide_src/source/database/configuration.rst b/user_guide_src/source/database/configuration.rst
index 4f88c25ab..3f3bae336 100644
--- a/user_guide_src/source/database/configuration.rst
+++ b/user_guide_src/source/database/configuration.rst
@@ -28,6 +28,10 @@ prototype::
$db['default']['autoinit'] = TRUE;
$db['default']['stricton'] = FALSE;
+If you use PDO as your dbdriver, you can specify the full DSN string describe a connection to the database like this::
+
+ $db['default']['dsn'] = 'pgsql:host=localhost;port=5432;dbname=database_name';
+
You can also specify failovers for the situation when the main connection cannot connect for some reason.
These failovers can be specified by setting the failover for a connection like this::
@@ -128,7 +132,7 @@ Explanation of Values:
**username** The username used to connect to the database.
**password** The password used to connect to the database.
**database** The name of the database you want to connect to.
-**dbdriver** The database type. ie: mysql, postgres, odbc, etc. Must be specified in lower case.
+**dbdriver** The database type. ie: mysql, postgre, odbc, etc. Must be specified in lower case.
**dbprefix** An optional table prefix which will added to the table name when running :doc:
`Active Record <active_record>` queries. This permits multiple CodeIgniter installations
to share one database.
@@ -162,8 +166,8 @@ Explanation of Values:
$db['default']['port'] = 5432;
====================== ==================================================================================================
-.. note:: 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 the
- database name will be the path to your database file. The information
- above assumes you are using MySQL.
+.. note:: Depending on what database platform you are using (MySQL, PostgreSQL,
+ etc.) 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.