I'm new to PHP first of all ..
My question is once I got the $result from Server1 using mysql_query , how can I create Table2 that would stored in host2
<?php
$connect1 = mysql_connect(host1,user,pass);
$selected = mysql_select_db(database1,$connect1);
$result = mysql_query("select a,b,c from table1");
$connect2 = mysql_connect(host2,user,pass);
$selected = mysql_select_db(database2,$connect2);
mysql_query("create table table2 as select $result from table2");
?>
They are two different servers (both in MySQL) .. answer in details would appreciated.
Thanks