Welcome Guest, Not a member yet? Register   Sign In
how to load multiple databases/models
#1

[eluser]face1m[/eluser]
Greetings Forum: I was trying to load multiple database using the method described in the manual.
$var = $this->db->load->database('hot_lotto', [True/False]);
$var2 = $this->db->load->database('cashg', [True/False]);

I set up the database.php file like so:

$db['hot_lotto']['hostname'] = "localhost";
...

$db['cashg']['hostname'] = "localhost";
...

With this configuration, I can only access one database, the last one defined. I loaded the db's in the controller file. Tried using both true/false options without success. The database class is loaded in autoload.php.

$active_group = "hot_lotto";
$active_record = TRUE;

I am using the lastest CI version. what am i doing wrong? thanks in advance.
rick


Messages In This Thread
how to load multiple databases/models - by El Forum - 02-27-2010, 11:36 AM
how to load multiple databases/models - by El Forum - 02-27-2010, 10:27 PM
how to load multiple databases/models - by El Forum - 03-01-2010, 01:20 PM
how to load multiple databases/models - by El Forum - 03-01-2010, 01:30 PM



Theme © iAndrew 2016 - Forum software by © MyBB