odbc_num_rows always returns -1
| From: | Peter Lavender | Date: | Tue, 20 Nov 2001 11:52:32 +0000 |
| Subject: | odbc_num_rows always returns -1 | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-75228@lists.php.net to get a copy of this message | ||
Hi Everyone,
As the subject says.
I'm using 4.0.6 on IIS/win2k to a MSSQL 2000 database.
I wish to check if a query returns any values, so the code I have is nothing
more than:
$numRows = odbc_num_rows($result);
print ("$numRows<br>");
if ($numRows <= 0) {
print("Nothing to show");
}
Have I missed something.. with the result always being -1, it causes me some
problems.. :)
Thanks
Pete