CodeIgniter Forums
get list of databases - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: get list of databases (/showthread.php?tid=57255)



get list of databases - El Forum - 02-28-2013

[eluser]rochellecanale[/eluser]
hello guys how can i display all the databases in mysql using active record or tradational query?
something like:

Code:
<?php
            $showdatabase = "SHOW DATABASES";
            $resultshow = $this->db->query($showdatabase);
            foreach($resultshow->result_array() as $row){
                
        ?>        
                <tr>
                    <td>
                        &lt;?php
                            echo "<label>".$row['']."</label>";   //dont know how can i get the list of databases
                        ?&gt;
                    </td>
                </tr>    
        &lt;?php        
            }
        ?&gt;



get list of databases - El Forum - 02-28-2013

[eluser]rochellecanale[/eluser]
ok i found the answer it is in the database utility class