@raven_corwin
To change the default database in CodeIgniter, you need to modify the database configuration file located at application/config/database.php
.
For example, if your default group is named 'default'
, you can load the database in your models like this:
1
|
$this->load->database(); |
Alternatively, you can also specify the database connection group in your models, controllers, or other components like this:
1
|
$this->load->database('group_name'); |
By following these steps, you can easily change the default database in your CodeIgniter application.