title: php connecting to two databases on diff servers and using insert select
body: <p>hi I need some help what I am trying to do is using insert select statement like this where databases are on diff servers.</p>
  
  <pre><code>insert into db1.copy2 (c1,c2) select c1,c2 from db2.copy2;
  </code></pre>
  
  <p>db1 is on amazon web service relation database and db2 is on local host(wamp) how can i make a PHP script that can accommodate two databases like that and that will allow me to execute a query like that. this script will execute on local host
  thanks.. </p>