CodeIgniter Working with multiple Databases

uncelmSaumn

New Member
I am trying to list all the mysql databases and their respective tables, I am currently using this, but can anybody recommend if there is any better way.\[code\]$q = $this->db->query('SHOW DATABASES');$databases = $q->result_array();foreach($databases as $db) { $this->db->query('USE '. $db['Database']); $q = $this->db->query('SHOW TABLES'); $tables = $q->result_array(); }\[/code\]
 
Back
Top