mysql_select_db()
bool mysql_select_db(database[,connection])
This function sets the database to be used by the current MySQL connection, but you also can use it to set the database for another connection by supplying it as a second argument. The function returns true if it’s successful, and false if it’s unsuccessful. Here is an example:
...
$connection = mysql_connect('localhost','tina','muller');
mysql_select_db('workrequests', $connection);
...