CodeIgniter Forums
Multiple database issues..? - Printable Version

+- CodeIgniter Forums (
+-- Forum: Archived Discussions (
+--- Forum: Archived General Discussion (
+--- Thread: Multiple database issues..? (/showthread.php?tid=5860)

Multiple database issues..? - El Forum - 02-06-2008

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:
$this->otherDB = $this->load->database('other', true);

and later,
$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?