• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
database list

#1
Hi,

I use this :

PHP Code:
        $this->load->dbutil();
        $dbs $this->dbutil->list_databases();

        foreach ($dbs as $db)
        {
            if ($this->dbutil->database_exists($db))
            {
                   echo $db."<br>";
            }
        

I don't understand, but it list all databases that I have (all, not just which I use in my application).

How to list the databases defined in the database.php (only) ?

Thanks a lot !!
Reply

#2
(10-30-2019, 04:47 AM)Cognie Wrote: Hi,

I use this :

PHP Code:
        $this->load->dbutil();
        $dbs $this->dbutil->list_databases();

        foreach ($dbs as $db)
        {
            if ($this->dbutil->database_exists($db))
            {
                   echo $db."<br>";
            }
        

I don't understand, but it list all databases that I have (all, not just which I use in my application).

How to list the databases defined in the database.php (only) ?

Thanks a lot !!

@Cognie,

try this... 
Code:
$this->db->database;
Reply

#3
Hi, 

Thanks,

PHP Code:
$this->db->database

echo the last database Confused  (I 4 databases in my application).
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.