In this tutorial you will learn about the MySQL Select Database and its application with practical example.
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.
|
1 |
mysql_select_db( db_name, connection ); |
| 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. |
