Hey, my code is posted below. Running this page returns this error:
"Warning: 0 is not a Sybase result index in"
The error message also gives a line number which corresponds to this
line:
while($row = sybase_fetch_row($q)) {
What does this error message mean? How do i fix it?
TIA!
===========================================================
<?php
include("./includes/connect.inc"
include("./includes/head.inc"
?><H4>Book Library Test</H4>
<table>
<?php
if (!$conn) {
echo "Could not open database.";
exit;
}
$q = "EXEC wb_getBooks @sSort = 'Author'";
if (!$q) {
echo "An error occured.\n";
exit;
}
while($row = sybase_fetch_row($q)) { //this is the error line
echo"<tr>";
while(list($k, $v) = each($row)) {
echo "<td>$v</td>";
}
echo "</TR>";
}
?>
</table>
<?php
include("./includes/foot.inc"
?>