The PEAR $db->fetchRow Blues (ref: DB_mysql...
[email protected] (Robert Kelly)
| Newsgroups | php.pear |
|---|---|
| Message-ID | <[email protected]> |
The PEAR FETCHROW BLUES
current CVS version
// no work
while($row = $result->fetchRow(DB_FETCHMODE_ASSOC)) {
// because the fetchRow line return $this->raiseError
// works
while (! DB::isError ( $row = $result->fetchRow (DB_FETCHMODE_ASSOC)) ){
// but makes the if $moredata==NULL redundant (? please confirm )
I can see the simplicity of version one, the error checking in
version 2 and I don't care which one should be used. However, all
of the very little documentation out there uses version one, and if
you're/we're going to grow PEAR, you may want to concern yourself with
barriers to entry (learning curve) and first impressions. As
it stands now, if someone downloads PEAR and runs the "newbie" demoResult
script, it doesn't work.
_I_ on the other hand, wants to use the error checking version, because
I am prone to fall flat on my face :)
Is there any way to edit the phpbuilder articles?
-Bob Kelly
[email protected]