The mysql_* functions should no longer be used should one opt for Mysqli if it is not possible simply inform the fourth argument of mysql_connect()
true, this will create a new connection. It should be passed in mysql_query()
with their consultation.
mysql_select_db()
returns a boolean saying whether it was possible to access the database or not.
Do it this way:
$Conn_1 = mysql_connect("teste","teste","teste", true);
mysql_select_db("BANCO1", $Conn_1);
mysql_query("select ... from ... ", $Conn_1);
$Conn_2 = mysql_connect("teste","teste","teste", true);
mysql_select_db("BANCO2", $Conn_2);
mysql_query("select ... from ... ", $Conn_2);
Recommended reading:
Why should we not use mysql type functions_*?
Banks are on the same server ?
– Chefe Druida
One location and another on Kinghost... Different servers
– Eduardo