Skip to content

Commit bceb19e

Browse files
committed
docs: add section titles
1 parent e277406 commit bceb19e

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

user_guide_src/source/database/configuration.rst

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ connection values (username, password, database name, etc.). The config
1818
file is located at **app/Config/Database.php**. You can also set
1919
database connection values in the **.env** file. See below for more details.
2020

21+
Setting Default Database
22+
========================
23+
2124
The config settings are stored in a class property that is an array with this
2225
prototype:
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

3235
DSN
33-
===
36+
---
3437

3538
Some database drivers (such as PDO, PostgreSQL, Oracle, ODBC) might
3639
require 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+
4551
You 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

5864
Failovers
59-
=========
65+
---------
6066

6167
You can also specify failovers for the situation when the main connection cannot connect for some reason.
6268
These 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

6672
You can specify as many failovers as you like.
6773

74+
Setting Multiple Databases
75+
==========================
76+
6877
You may optionally store multiple sets of connection
6978
values. If, for example, you run multiple environments (development,
7079
production, test, etc.) under a single installation, you can set up a

0 commit comments

Comments
 (0)