Subject | Firebird & PHP in Netobjects Fusion |
---|---|
Author | Johan van Zyl |
Post date | 2005-03-26T20:04:30Z |
Hi All
This code:
<?
print "Connected to: ";
print " ";
$host = "10.0.0.3:employee.fdb";
//$host = "10.0.0.6:testfb";
print_r($host);
$username = "SYSDBA";
$password = "masterkey";
$dbh = ibase_connect($host, $username, $password);
if (!$dbh)
{
exit ("Unable to establish a connection - please try later.");
}
else
{
$stmt = "SELECT FIRST_NAME, LAST_NAME FROM EMPLOYEE ORDER BY
LAST_NAME
DESC, FIRST_NAME DESC";
$result = ibase_query($stmt);
//$row_array = ibase_fetch_row($result);
//$row_array = ibase_fetch_row($result);
//print_r($row_array);
?>
<TABLE BORDER=0 BGCOLOR='#55BFFF' CELLSPACING=6 CELLPADDING=0
WIDTH='100%'>
<TR>
<TD><P><B>First Name</B></P></TD>
<TD><P><B>Last Name</B></P></TD>
</TR>
<?
While ($row = ibase_fetch_assoc($result))
{
echo "<TR>";
echo "<TD><SPAN STYLE= 'font-size: 11px;'>";
echo $row["FIRST_NAME"];
echo "</TD>";
echo "<TD><SPAN STYLE= 'font-size: 11px;'>";
echo $row["LAST_NAME"];
echo "</TD>";
echo "</TR>";
}
echo "</table>";
ibase_free_result($result);
}
?>
gives me this error:
Connected to: 10.0.0.3:employee.fdb
First Name Last Name
Fatal error: Call to undefined function: ibase_fetch_assoc() in
/home/e-smith/files/ibays/Primary/html/html/untitled17.php on line 209
How do I solve this?
Thx
This code:
<?
print "Connected to: ";
print " ";
$host = "10.0.0.3:employee.fdb";
//$host = "10.0.0.6:testfb";
print_r($host);
$username = "SYSDBA";
$password = "masterkey";
$dbh = ibase_connect($host, $username, $password);
if (!$dbh)
{
exit ("Unable to establish a connection - please try later.");
}
else
{
$stmt = "SELECT FIRST_NAME, LAST_NAME FROM EMPLOYEE ORDER BY
LAST_NAME
DESC, FIRST_NAME DESC";
$result = ibase_query($stmt);
//$row_array = ibase_fetch_row($result);
//$row_array = ibase_fetch_row($result);
//print_r($row_array);
?>
<TABLE BORDER=0 BGCOLOR='#55BFFF' CELLSPACING=6 CELLPADDING=0
WIDTH='100%'>
<TR>
<TD><P><B>First Name</B></P></TD>
<TD><P><B>Last Name</B></P></TD>
</TR>
<?
While ($row = ibase_fetch_assoc($result))
{
echo "<TR>";
echo "<TD><SPAN STYLE= 'font-size: 11px;'>";
echo $row["FIRST_NAME"];
echo "</TD>";
echo "<TD><SPAN STYLE= 'font-size: 11px;'>";
echo $row["LAST_NAME"];
echo "</TD>";
echo "</TR>";
}
echo "</table>";
ibase_free_result($result);
}
?>
gives me this error:
Connected to: 10.0.0.3:employee.fdb
First Name Last Name
Fatal error: Call to undefined function: ibase_fetch_assoc() in
/home/e-smith/files/ibays/Primary/html/html/untitled17.php on line 209
How do I solve this?
Thx