<?php
require_once("ibclass.php");
$ib = New ib('127.0.0.1:DEMO.GDB','SYSDBA','password',1);
function query() {
global $ib;
$query=$ib->query("select * from TABLE1");
$out=""; //Defining output var
$count=0;
while ($row = ibase_fetch_assoc($query)) {
foreach ($row as $rname=>$rvalue) {
$out.="$rname=>$rvalue,";
}
$count++; //interbase has not the numrows property as mysql, so you should make your own counter.
$out.="<br>";
}
$out.="NUMROWS:$count";
$ib->free_result ();
return $out;
}
echo query();
$ib->disconnect();
?>
|