Re: The PEAR $db->fetchRow Blues (ref: DB_mysql...

From: Date: Fri, 16 Feb 2001 14:42:53 +0000
Subject: Re: The PEAR $db->fetchRow Blues (ref: DB_mysql...
References: 1  Groups: php.pear 
Request: Send a blank email to php-pear+get-1365@lists.php.net to get a copy of this message
Chuck Hagenbuch wrote: > > Quoting Vinai Kopp <kopp@netzarbeiter.de>: > > > while( $row = $result->fetchRow(DB_FETCHMODE_ASSOC) ){ > > if( DB::isError( $row ) ){ > > handle_db_error( $row ); > > break; > > } > > Okay, that's one opinion. Stig, you asked for comments, I gave them. What next? My opinion is that fetchRow and friends should return NULL when there is no more data and errors only when there is an actual error. Unless anyone objects, I will change it back and make it consistent. Adding a test for it wouldn't hurt either. - Stig

« previous php.pear (#1365) next »