Welcome Guest, Not a member yet? Register   Sign In
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




Theme © iAndrew 2016 - Forum software by © MyBB