I'm using codeigniter 2.0++ or specifically 3.0-dev. The thing is I have multiple database connection and the profiler only shows query from the default connection $this->db.
class table_m extends CI_Model
{
function __construct()
{
parent :: __construct();
$this->db2 = $this->load->database('production', TRUE);
}
function sel_pameran($ukmper=NULL)
{
$sql = "SELECT * from table1";
$query = $this->db2->query($sql);
return $query->result();
}
}
This query won't be shown in the profiler because it uses $this->db2. So how do make the profiler shows every query that is executed, doesn't matter from which database?