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
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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.