[eluser]xwero[/eluser]
The database config is not a normal config file and the database class is not set up to extract the values from the config file so you could add following method to the MY_Config class
Code:
function dbitem($str = null,$group= 'default')
{
if(is_null($str))
{
return false;
}
include(APPPATH.'config/database'.EXT);
if(!array_key_exists($str,$db[$group]))
{
return false;
}
return $db['group'][$str];
}
And then you can do
Code:
$this->config->dbitem('username');