July 19th, 2000, 08:54 AM
I'm trying to open 2 separate tables in 2 separate MySQL databases at one time. I've tried giving separate link identifiers, but for some reason, when the 2nd one is run, the first one seems to cancel. Is there anyway that I can have 2 database connections at once or do I have to do them both separately?
July 19th, 2000, 10:38 AM
Are both databases served from the same MySQL server or from different ones? You only make one connection to a server no matter how many databases you access from that server.
If you are talking about 2 databases from the same server you do it this way:
$result=mysql_db_query('db1',".. your query ..");
$result2=mysql_db_query('db2'," .. other query");
if you are talking two different servers you do it this way: