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:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | $db[default][hostname] = localhost; $db[default][username] = root; $db[default][password] = ; $db[default][database] = cloudwaysdb;
Subscribe to:
Post Comments (Atom)
|
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.