There may be times when you require your application to connect to more than one database or database server. For example, imagine you managed an online shop, and you may wish to have one database to handle customer orders, billing, invoicing, and so on, and another database to store and maintain product and stock information. CodeIgniter can be configured to use many database instances, and the following section shows how you do it.
In order to let CodeIgniter interact with two or more databases, we'll need to amend a few settings in the
config file at:
Scroll down to the bottom of the file and copy the following into it. Remember to replace