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

[eluser]Nanodeath[/eluser]
I'll give more details if it turns out to be necessary, but I can simplify it down to the following hypothetical situation.

Two lines of code:
Code:
$this->otherDB = $this->load->database('other', true);
$this->load->database();

and later,
Code:
$query = $this->db->query("SELECT * FROM tableInDatabase");

However, it looks for tableInDatabase in $this->otherDB (and doesn't find it) instead of looking in $this->db.

Note that the "two lines of code" are actually in conceptually independent models, so I don't see why they shouldn't be able to handle their own database connections.

Am I using databases wrong or is this a bug?

Thanks!




Theme © iAndrew 2016 - Forum software by © MyBB