i need to join two different server and compare their tables. and find match email in both server tables. One table name is recover_unsub1 in recover(databse) and other table name is popular_screamer_archive in popular (databse) both table in different server.
[php]
<?php $master = mysql_connect("master_host","10.0.4.67","asramercy"); $slave = mysql_connect("slave_host","10.0.4.64","asramercy"); if(mysql_select_db("recover",$master) && mysql_select_db("popular",$slave)) { // stuff } else { echo mysql_error(); } //Both Selected $sql = mysql_query("SELECT * FROM recover_unsub1",$master); $rows = array(); while($row = mysql_fetch_assoc($sql)) { $slave_sql = mysql_query("SELECT * FROM popular_screamer_archive1 WHERE email = " . $row['email'],$slave); while($sub_row = mysql_fetch_assoc($slave_sql)) { $row = array_combine($sub_row,$row); } $rows[] = $row; } } ?>[/php]
Error# code not doing anything