Forum Moderators: coopster
As to your question, sure it's possible, but it's not necessary. You can do it with one connection, just name the databases in your queries, like:
SELECT stuff FROM database1.table...
INSERT INTO database2.table...
...this assumes that the connection's user has the necessary privileges for both databases and their affected tables.
I hope this helps.
Does that make sense?
$db_link_1 = mysql_connect('hostname1','user','passwd');
$db_link_2 = mysql_connect('hostname2','user','passwd');
$sql1 = "SELECT stuff FROM database1.table... ";
$sql2 = "INSERT INTO database2.table... ";
mysql_query($sql1,$db_link_1);
mysql_query($sql2,$db_link_2);
When making your connections, the local server can be 'localhost', but for the remote connection you'll need to use that hostname.
I hope this helps.