mysql_select_db
bool mysql_select_db(string database_name, [mysql link connection])
database_name | Database to select |
connection | Connection handle returned by mysql_connect() or mysql_pconnect() |
Sets the active database.
Returns:
TRUE on success; FALSE otherwise
Description:
mysql_select_db() sets the active database for the connection referenced by connection . If no connection handle is specified in the connection argument, the last connection opened is used by default. If no connection is open, mysql_select_db() attempts to connect to a MySQL database by calling mysql_connect() without arguments.
The active database works with mysql_query(), providing the default database for queries. See mysql_query() for more information.
Note:
This ...
Get PHP Functions Essential Reference now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.