<?php // important! - to run this script in specific intervals - set task schedule/cron in windows // Connection // ### FIREBIRD ### $db = "F:\Data.gdb"; $dbuser = "sysdba"; $dbpass = "masterkey"; $res = ibase_connect($db,$dbuser,$dbpass) or die("<br>" . ibase_errmsg()); // ### MYSQL ### $dbhost = "localhost"; $dbname = "localhost_t1"; $username = "root"; $password = ""; try { $conn = new PDO("mysql:host=$dbhost;dbname=$dbname", $username, $password); // set the PDO error mode to exception $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); print "Connected successfully"; print "<br />"; } catch(PDOException $e) { print "Connection failed: " . $e->getMessage(); print "<br />"; } // End of connection // Query $sql="select * from WIZYTY"; $result=ibase_query($res,$sql) or die(ibase_errmsg()); while($row=ibase_fetch_object($result)){ print $row->WIZ_ID; print '<br />'; } ibase_free_result($result); // End of Query // Closing ibase_close($res) or die("<br>" . ibase_errmsg()); ?>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)