Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

PHP mysqli_select_db() Function

PHP mysqli_select_db() Function

PHP MySQLi Reference Manual PHP MySQLi Reference Manual

Change the default database of the connection:

Drop the database


Definition and Usage

The mysqli_select_db() function is used to change the default database of the connection.


Syntax

mysqli_select_db(

connection,dbname

)

;

Parameters Description
connection Required. Specifies the MySQL connection to use.
dbname Required, specifies the default database to use.

Technical Details

Return Value: Returns TRUE on success, FALSE on failure.
PHP Version: 5+

PHP MySQLi Reference Manual PHP MySQLi Reference Manual