Welcome Guest, Not a member yet? Register   Sign In
Using Multiple Databases
#1

[eluser]Kolombo[/eluser]
I am looking to connect to multiple external databases (currently 2, expanding to 6) and am looking for the best/most efficient way of doing this without checking and switching databases within each function.

Currently for example this function will work but it means calling the function twice in the controller and performing this database load within every function that requires it.

Code:
function get_some_information($site){
  $DB = $this->load->database($site, TRUE);  
}

Any ideas on what the most efficient/scalable way of doing this is?

Thanks


Messages In This Thread
Using Multiple Databases - by El Forum - 01-22-2013, 03:19 AM
Using Multiple Databases - by El Forum - 01-22-2013, 04:38 AM
Using Multiple Databases - by El Forum - 01-22-2013, 06:46 AM
Using Multiple Databases - by El Forum - 01-22-2013, 07:11 AM
Using Multiple Databases - by El Forum - 01-23-2013, 09:03 AM



Theme © iAndrew 2016 - Forum software by © MyBB