Jump to content

[SOLVED] Join within two connections


wsantos

Recommended Posts

Is it possible to make a join from two connections?

 

  $con1 = mysql_connect("ip1","user","pwd");
  if(!$con1)
  {
    die('Could not connect: ' . mysql_error());
  }
  $db1 = mysql_select_db("table1",$con1);

  $con2 = mysql_connect("ip2","user","pwd");
  if(!$con1)
  {
    die('Could not connect: ' . mysql_error());
  }
  $db2 = mysql_select_db("table2",$con2);

Link to comment
https://forums.phpfreaks.com/topic/61854-solved-join-within-two-connections/
Share on other sites

We need to close first connection in order to connect to the second one, If at all u don't need both databases at a time , u write two functions(including mysql_close(); ) two deal with the two connections depending upon the need, u can call one.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.