i have firebird server and firebird database installed on windows server. port on this db is 8095. On this server i have installed PHP, and i need connect on this DB with php, here is my code which i tried but not success:
<?php
$host = 'localhost:D:\path\to\Database.FDB';
$username = 'user';
$password = 'pass';
$dbh = ibase_connect($host, $username, $password);
$stmt = 'SELECT * FROM StoreCards';
$sth = ibase_query($dbh, $stmt);
while ($row = ibase_fetch_object($sth)) {
echo $row->Code, "\n";
}
ibase_free_result($sth);
ibase_close($dbh);
?>
can you help me please?
thanks a lot
EDIT :
working with this code :
$dbh = ibase_pconnect("ipaddr:path-to-db.FDB", "user", "pass") or die('die message');
$q = ibase_query($dbh, "select * from StoreCards");
while ($r = ibase_fetch_object($q)) {
$some_value = $r->CODE;
echo $some_value;
}