meta data for this page
  •  

Testing

Run the following script. Make sure that the Firebird example employee database is at the location specified in $dbname.

<?php
 
header("Content-Type: text/plain");

$dbname = '/opt/firebird/examples/empbuild/employee.fdb';

$dbuser = '';

$dbpassword = '';

$res = ibase_connect($dbname, $dbuser, $dbpass) or

die(ibase_errmsg());
#
#
$sql = "SELECT * FROM Country";

$result = ibase_query($res, $sql) or die(ibase_errmsg());
 
echo ibase_num_fields($result);

while($row=ibase_fetch_object($result))

{
  printf("%-15s %s\n", $row->COUNTRY, $row->CURRENCY); 
}

ibase_free_result($result);

ibase_close($res) or die(ibase_errmsg());

?>