Re: DB_mssql fetchrow and mssql/freetds
| From: | Chuck Hagenbuch | Date: | Mon, 04 Dec 2000 20:22:43 +0000 |
| Subject: | Re: DB_mssql fetchrow and mssql/freetds | ||
| References: | 1 2 3 | Groups: | php.pear |
| Request: | Send a blank email to php-pear+get-514@lists.php.net to get a copy of this message | ||
Quoting Sterling Hughes <Sterling.Hughes@pentap.net>:
> It shouldn't return Null, that will cause loops like:
>
> while (!DB::isError($row = $sth->fetchRow()))
> {
> print $row['somecol'];
> }
>
> to go on infinitely, which is incorrect behaviour.
Well... it also might be an incorrect way to right the loop. But having one
check (DB::isError()) to end the loop is probably a good thing, which means we
need a standard error to throw meaning just "End of result set, carry on,
nothing wrong here", and to use it everywhere.
-chuck
--
Charles Hagenbuch, <chuck@horde.org>
"If you can't stand the heat, get out of the chicken!" - Baby Blues