@@ -18,6 +18,9 @@ connection values (username, password, database name, etc.). The config
1818file is located at **app/Config/Database.php **. You can also set
1919database connection values in the **.env ** file. See below for more details.
2020
21+ Setting Default Database
22+ ========================
23+
2124The config settings are stored in a class property that is an array with this
2225prototype:
2326
@@ -30,7 +33,7 @@ while connecting to specify a group name.
3033 If you want to change the location, you must set the full path to the new folder.
3134
3235DSN
33- ===
36+ ---
3437
3538Some database drivers (such as PDO, PostgreSQL, Oracle, ODBC) might
3639require a full DSN string to be provided. If that is the case, you
@@ -42,6 +45,9 @@ driver's underlying native PHP extension, like this:
4245.. note :: If you do not specify a DSN string for a driver that requires it, CodeIgniter
4346 will try to build it with the rest of the provided settings.
4447
48+ DSN in Universal Manner
49+ ^^^^^^^^^^^^^^^^^^^^^^^
50+
4551You can also set a Data Source Name in universal manner (URL like). In that case DSNs must have this prototype:
4652
4753.. literalinclude :: configuration/003.php
@@ -56,7 +62,7 @@ add the config variables as a query string:
5662 fields, CodeIgniter will append them.
5763
5864Failovers
59- =========
65+ ---------
6066
6167You can also specify failovers for the situation when the main connection cannot connect for some reason.
6268These failovers can be specified by setting the failover for a connection like this:
@@ -65,6 +71,9 @@ These failovers can be specified by setting the failover for a connection like t
6571
6672You can specify as many failovers as you like.
6773
74+ Setting Multiple Databases
75+ ==========================
76+
6877You may optionally store multiple sets of connection
6978values. If, for example, you run multiple environments (development,
7079production, test, etc.) under a single installation, you can set up a
0 commit comments