CodeIgniter Forums

Full Version: Multiple database issues..?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

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?