Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

select_database always returns false #46

Closed
JamesWilson19947 opened this issue Apr 16, 2018 · 1 comment
Closed

select_database always returns false #46

JamesWilson19947 opened this issue Apr 16, 2018 · 1 comment

Comments

@JamesWilson19947
Copy link

Hi,

Unless I'm missing something obvious, this function always returns false?

    /**
     *  Selects the default database for queries.
     *
     *  <code>
     *  // set the default database for queries
     *  $db->select_database('database_name');
     *  </code>
     *
     *  @param  string  $database   Name of database to select as the default database for queries.
     *
     *  @since 2.9.4
     *
     *  @return boolean     Returns TRUE on success or FALSE on failure.
     */
    public function select_database($database) {

        // if no active connection exists, return false
        if (!$this->_connected()) return false;

        // update the value in the credentials
        $this->credentials['database'] = $database;

        // select the database
        mysqli_select_db($this->connection, $database);

    }
@stefangabos
Copy link
Owner

yes, apparently it does...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants