Open sagark1510 opened 8 years ago
The current version of MY_Model is missing this capability despite the documentation claiming it exists.
To fix, add to the VARIABLES section of MY_Model (before the constructor)
protected $_db_group;
Then in the constructor replace
$this->_database = $this->db;
with
$this->_database = empty($this->_db_group) ? $this->db : $this->load->database($this->_db_group, TRUE);
And then initialize$_db_group
in your model that extends MY_Model:
public $_db_group = 'your_database_name';
Hi as per the documnetation $_db_group = 'group_name'; will make this->_db to point on defined db but how can I make a persistant connection to both db and query both of them at a time?