diff options
author | Andrey Andreev <narf@bofh.bg> | 2012-03-01 19:23:01 +0100 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2012-03-01 19:23:01 +0100 |
commit | dd389df69cd1ab74316ac7a7e227a5f47f16f95c (patch) | |
tree | 3d8e7fcfaf6df7c10dc3870455d7ef63b9d50762 /user_guide_src/source/database | |
parent | c5a1f93ef25c99df4035ef7182a6200b91afabab (diff) | |
parent | 8edf87dbb0dcbe61e8cbaa6229c70a46bee6dbd4 (diff) |
Merge upstream branch
Diffstat (limited to 'user_guide_src/source/database')
-rw-r--r-- | user_guide_src/source/database/configuration.rst | 4 | ||||
-rw-r--r-- | user_guide_src/source/database/connecting.rst | 6 |
2 files changed, 10 insertions, 0 deletions
diff --git a/user_guide_src/source/database/configuration.rst b/user_guide_src/source/database/configuration.rst index 4f88c25ab..040e7e33f 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:: diff --git a/user_guide_src/source/database/connecting.rst b/user_guide_src/source/database/connecting.rst index a834cc0f7..fb4524116 100644 --- a/user_guide_src/source/database/connecting.rst +++ b/user_guide_src/source/database/connecting.rst @@ -122,6 +122,12 @@ return the database object. | $DB1->result(); | etc... +.. note:: You don't need to create separate database configurations if you + only need to use a different database on the same connection. You + can switch to a different database when you need to, like this: + + | $this->db->db_select($database2_name); + Reconnecting / Keeping the Connection Alive =========================================== |