php - CodeIgniter Working with multiple Databases -


I am trying to list all mysql databases and their respective tables, I am currently using it, But there is no better way if anyone can recommend there.

  $ q = $ this- & gt; Db- & gt; Query ('show database'); $ Database = $ q- & gt; Result_are (); Forex Currency ($ databases $ db) {$ this- & gt; Db- & gt; Query ('USE'. $ Db ['database']); $ Q = $ this- & gt; Db- & gt; Query ('Show Tab'); $ Tables = $ q- & gt; Result_are (); }  

You can use special databases, which contain all other databases Describe, with tables and columns.

In this way you only need 1 query:

  SELECT table_schema, info_schema.tables OR_DE_table_schema, table_name from table_name;  

Comments