07-23-2010, 06:40 AM
[eluser]smilie[/eluser]
Hi all,
Has anyone experience with multiple databases within CI?
I have 2 database groups, let's say:
db1 (this one is set as active group in database.php config);
db2;
Then, in my code I use:
However, in the above - CI uses db1 parameters - and ofcourse can not execute query (missing tables).
Why - oh why, does CI do this?!
Is there a way to dump which database params are beeing used?
Thanks!
Smilie
Hi all,
Has anyone experience with multiple databases within CI?
I have 2 database groups, let's say:
db1 (this one is set as active group in database.php config);
db2;
Then, in my code I use:
Code:
$db2 = $this->load->database('db2',TRUE);
$db2->query("SELECT * FROM table2");
$res = $db2->result_array();
However, in the above - CI uses db1 parameters - and ofcourse can not execute query (missing tables).
Why - oh why, does CI do this?!

Is there a way to dump which database params are beeing used?
Thanks!
Smilie