I need a separate DB connection for single model. At the beggining i thought that it can be solved by loading model via:
but it is switching db connection for whole application, so any db call after that (also in other models loaded later) uses this connection.
Making change in constructor of model like this:
and using then only $this->db2 in this model id the only solution ?
Code:
$this->CI->load->model('some_model','','db_configuration_name');
but it is switching db connection for whole application, so any db call after that (also in other models loaded later) uses this connection.
Making change in constructor of model like this:
Code:
$this->db2 = $this->load->database('db_configuration_name',TRUE);