[eluser]cimmerian[/eluser]
I'm writing a method that performs queries on the information_schema database. It needs to know the name of active database. I solved it by using a MySQL query:
Code:
$this->db->select('DATABASE() AS database_name');
$rows = $this->db->get()->result();
$database = $rows[0]->database_name;