Re: [PHP-PEAR] The PEAR $db->fetchRow Blues (ref: DB_mysql...
[email protected] ("Stig S. Bakken")
| Newsgroups | php.pear |
|---|---|
| Organization | Fast Search & Transfer |
| Message-ID | <[email protected]> |
Chuck Hagenbuch wrote: > > Quoting Vinai Kopp <[email protected]>: > > > 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