Re: DB_mssql fetchrow and mssql/freetds

From: Date: Mon, 04 Dec 2000 07:24:03 +0000
Subject: Re: DB_mssql fetchrow and mssql/freetds
References: 1 2  Groups: php.pear 
Request: Send a blank email to php-pear+get-508@lists.php.net to get a copy of this message
> Quoting chrisj@ctel.net: > > > I've been trying to use DB_mssql using PHP4.0.3pl1 and FreeTDS 0.50. What I've > > found is that DB::fetchRow returns an unknow error on end of result set and > > not a false like the native function (mssql_fetchrow) or a 'NULL' like > > DB::fetchRow for mysql. Has this been seen by others? If so, I can fix it and > > submit a patch, but I'm new to mssql w/freetds and want to see some > > confirmations before fixing something that isn't really broken. > > I haven't seen it (no mssql experience), but it should be consistent with the > other implementations, and NULL sounds like reasonable behavior to me... > 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. -Sterling

« previous php.pear (#508) next »