Welcome Guest, Not a member yet? Register   Sign In
Multiple database connectivity
#1

[eluser]Sanjib Kumar Jena[/eluser]
Hi All,

I have integrated two databases in my site. I can able to access multiple database as bellow.

$this->DBOne = $this->load->database('default', TRUE);
$this->DBtwo = $this->load->database('another', TRUE);

But what's my problem is i have to write the above code in almost all of model constructor.
Is there any trick or method to get all the database objects automatically in the model or controller instead of writing the above code. I mean can we autoload the databases and get the database instances which will be available through out our program.


Messages In This Thread
Multiple database connectivity - by El Forum - 08-24-2012, 04:20 AM
Multiple database connectivity - by El Forum - 08-24-2012, 04:30 AM
Multiple database connectivity - by El Forum - 08-24-2012, 10:49 AM



Theme © iAndrew 2016 - Forum software by © MyBB