Codeigniter : Solve Multiple Connection databases

Hello there, i’m here just wanna share my problem. Here i have a problem when i call my database connection on my model. But i was finally solve it with myself :D. So i just wanna share you, so if you have the same problem you can follow this trick.

Here my 2 database config name.

$db'sia' = "localhost";
$db'sialumni' = "localhost";

when i wanna use “sia” database on my model with this line of code :

$this->load->database('sia', TRUE);
return $q;

but I got an error. so i solved it with this line of code :

$this->db_sia=this->load->database('sia', TRUE);
return $q;

So all is good as well as I fixed it.

Thank you for visiting and reading my notes.

I hope its usefull for me and you.

See you next time, bye bye :)