Welcome Guest, Not a member yet? Register   Sign In
Loading a model with config array
#1

[eluser]textnotspeech[/eluser]
I'm about to pull all of my hair out. I use two databases in my application, one for my purposes (referred to as my_database) and one database that is my clients. The client's database models are loaded dynamically with:
Code:
$this->load->model('Model_name', '', $config);
The config array is all good but it gives me an error:
Quote:Error Number: 1146

Table 'my_database.table_name' doesn't exist

SELECT * FROM (`about`) LIMIT 1
Why is it trying to connect to the database in my config file when I'm clearly passing the connection options when I load the model. I had this working perfectly, I must have made a misstep somewhere because all of a sudden, my stuff is f'ed. I know there was a problem before with the 1.6.1 and I had a problem then too. I'm now using 1.6.3 (been using it for a while with no problems) and all of a sudden this problem is back. I'm going crazy here. Is this a bug or am I an idiot?




Theme © iAndrew 2016 - Forum software by © MyBB