MySQL Select Database

Once you get connection with MySQL server,it is required to select a specific database to perform any operation on that DB.

Selecting MySQL Database Using PHP:

PHP provides function mysql_select_db to select a database.It returns TRUE on success or FALSE on failure.

 

Parameter Description
db_name Required – MySQL Database name to be selected
connection Optional – if not specified then last opened connection by mysql_connect will be used.