Welcome Guest, Not a member yet? Register   Sign In
Issue with CI2, db_connect settings for models
#1

[eluser]Unknown[/eluser]
I searched but couldn't find any posts with the same issue I am having.

I am using a central CMS to manage multiple sites using multiple databases and prior to upgrading to CI2, I was doing the following in an "Admin Area" controller:

Code:
$this->load->model('settings_model', '', $this->dbconfig);

The CMS connects to it's own central database first, however, to get user info, db settings, and modules. I am using the newest Modular Extensions, but the issue doesn't seem to have anything to do with that.

After upgrading, the system does not appear to be using the 3rd parameter of $this->load->model().

So now I am getting:
Quote:Table 'centraldb.settings' doesn't exist

I have both pconnect and autoinit set to FALSE for all my DB settings.

Am I missing something vital here?
#2

[eluser]InsiteFX[/eluser]
Well the CodeIgniter User Guide says it still works that way!

This is how the User Guide lists it:
Code:
$this->load->model('Model_name', '', $config);

So if it is not working I would report it as a BUG!

InsiteFX




Theme © iAndrew 2016 - Forum software by © MyBB