Re: odbc_num_rows ??
| From: | Manuel Lemos | Date: | Fri, 15 Sep 2000 04:39:53 +0000 |
| Subject: | Re: odbc_num_rows ?? | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-2662@lists.php.net to get a copy of this message | ||
Hello Budgee,
On 14-Aug-00 08:03:41, you wrote:
>The following code had two ways of counting the number of rows
>returned in a result. The first uses a loop counter, the seconf the
>odbc_num_rows function. Any ideas why the second doesn't work.
>It returns -1, the error code.
Because some ODBC drivers start returning query rows before the query
search has ended, so they can't guess how many rows there will be in total
in the result set. This is a good thing because it usually means the
client (PHP) may start browsing over the results before the search is over
and so the query processing runs faster.
Regards,
Manuel Lemos
Web Programming Components using PHP Classes.
Look at: http://phpclasses.UpperDesign.com/?user=mlemos@acm.org
--
E-mail: mlemos@acm.org
URL: http://www.mlemos.e-na.net/
PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp
--