Welcome Guest, Not a member yet? Register   Sign In
Loading model using a different database
#4

As I see it.

PHP Code:
$config['hostname'] = 'localhost';
$config['username'] = 'myusername';
$config['password'] = 'mypassword';
$config['database'] = 'mydatabase';
$config['dbdriver'] = 'mysqli';
$config['dbprefix'] = '';
$config['pconnect'] = FALSE;
$config['db_debug'] = TRUE;

$this->load->model('model_name'''$config); 

You need to create the config like in the email class and then pass the config array in the third parameter.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply


Messages In This Thread
RE: Loading model using a different database - by InsiteFX - 08-07-2018, 04:34 AM



Theme © iAndrew 2016 - Forum software by © MyBB