[eluser]Natebot[/eluser]
well, you can get a little further with the following:
In your controller, pass the database config settings to the library:
Code:
// a helper instead of a require line would be nice...
require(APPPATH.'config/database'.EXT);
$this->load->library('db_debug', $db[$active_group] );
In your library definition expect the parameters in a constructor
Code:
function DB_debug($params)
{
parent::CI_DB_active_record($params);
}
But that creates another DB connection right?
This will at least get the run() method to work but I'm getting the following for query():
Quote:Fatal error: Call to undefined method DB_debug::_escape_identifiers() in /system/database/DB_driver.php on line 1323
I'm curious how
Code:
$this->db->select('something');
$this->db_debug->get('table');
should work. Are they actually accessing the same $sql property value?
As an aside might you might wish DB_debug to extend CI_DB because it is a wrapper that extends the active record class or the base DB_driver class depending on the configuration settings.