note 89482 deleted from function.odbc-num-rows by danbrown
| From: | danbrown@php.net | Date: | Tue, 10 Mar 2009 14:12:00 +0000 |
| Subject: | note 89482 deleted from function.odbc-num-rows by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-151687@lists.php.net to get a copy of this message | ||
Note Submitter: stefaneroteev at dir dot bg
----
I think the best way to determine the count of the returned rows is the following code:
<?php
$counter = 0;
while(odbc_fetch_row($row))
{
$name=odbc_result($row,1);
$price=odbc_result($row,2);
$quantity=odbc_result($row,3);
$counter++;
}
print "The count of the returned rows is ".$counter;
?>
It works fine for me.