How To Use Multiple Database In Codeigniter

How To Use Multiple Database In Codeigniter

In this tutorial, we will explain to you how to use multiple database in codeigniter. CodeIgniter is MVC based PHP framework, it is possible to Manual database connections in Codeigniter. so you can follow the below code.

Multiple Database Configuration

if you want to connect dynamic databases in CodeIgniter then open the database.php file. this configuration file is available in the array format so you have to do it second database in an array configuration.

see below example

Connection to New Database

Close the Connections

Please follow and like us: