I load my first model:
$this->load->model('red_comercial');
then I get data from it:
$Sitios = $this->red_comercial->Obtener_Sitios();
it works fine but when I call the second model:
$config['hostname'] = "localhost";
$config['username'] = "root";
$config['password'] = "mipass";
$config['database'] = "midb";
$config['dbdriver'] = "mysql";
$config['dbprefix'] = "";
$config['pconnect'] = FALSE;
$config['db_debug'] = TRUE;
$this->load->model('punto_venta_model','',$config);
$Productos = $this->punto_venta_model->Obtener_Productos();
I get this error:
Table 'Name of my First DataBaseUse.Table of my second database' doesn't exist
the error is that it remains using my first database, I also do this:
$DB1 = $this->load->database('grupo_uno', TRUE);
$DB2 = $this->load->database('grupo_dos', TRUE);
but it also doesn't work :(
I can do this with mysqli_query but you know...