Pages

Thursday, March 1, 2018

Create Multiple Database Connections In CodeIgniter Applications

Create Multiple Database Connections In CodeIgniter Applications


Create Multiple Database Connections In CodeIgniter Applications


In real world CodeIgniter projects, developers need to work with multiple databases at the same time. This presents a unique challenge to developers. Since this is a common enough problem, CodeIgniter offers a simple solution for it.
In order to use multiple database connections in your CodeIgniter project, you just need to create multiple configuration arrays that simplify working with multiple databases.

The Default Configuration Array

Following is the structure of the default Codeigniter database configuration array: