title: how can i read from local firebird database and insert into remot MSSQL server data base by php
body: <p>could any one show me how i could column from local firebird database and insert the column values into a remot Mssql database</p>
  
  <p>like read column "col1" from firebird then take the data and copy it into MSSQL databas.</p>
  
  <p>this will help me to get started with my project.</p>
  
  <p><strong>NOTE:</strong> I've already connect to the tho both data bases and checked the connections.</p>
  
  <pre><code>&lt;?PHP /**********************************************/
  /************THE FIREBIRDCONNECTION**************/
  /**********************************************/
  
  $host = 'localhost:c:\DATABASE.fdb'; 
  $username=''; 
  $password='';
  $dbh = ibase_connect ( $host, $username, $password ) or die ("error in db connect"); //DB connection function
  $q="SELECT COLUMN FROM TABLE WHERE CODE = ''"; // query variable
  
  $query = ibase_prepare($q); // prepare the query to read from the DB.. send the q as a prameter 
  $result=ibase_execute($query); // after preaparin..run and execute the query .. send the query as a prameter
  $showRow = ibase_fetch_row($result); //fitching the row
  
  echo $showRow[0]; // row as an arry
  
  /* free result */ 
  ibase_free_query($query); //relase the query
  ibase_free_result($result); // show the resulte
  
  /* close db */ 
  ibase_close($dbh); // close the connection
  
  echo "&lt;/br&gt;";
  echo "&lt;/br&gt;";
  
  
  
  /**********************************************/
  /************THE MSSQL CONNECTION**************/
  /**********************************************/
  
  
  // instance name: InstanceName
  // database name: DATABASE2
  $host = "SERVERNAME\InstanceName";
  echo $host;
  $connectionInfo = array( "Database"=&gt;"DATABASE2", "UID"=&gt;"", "PWD"=&gt;"");
  $conn = sqlsrv_connect( $host, $connectionInfo);
  
  if( $conn === false ) {
      die( print_r( sqlsrv_errors(), true));
  } ?&gt;
  </code></pre>