Re: database driver: no more rows

From: Date: Wed, 22 Oct 2003 21:57:42 +0000
Subject: Re: database driver: no more rows
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-4920@lists.php.net to get a copy of this message
At 11:49 PM 10/22/2003 +0200, Ard Biesheuvel wrote:
Err .. I don't agree. Null means no data False means error.
Maybe historically (PHP-wise) it does. But the way I see it, every fetch() can 'fail' for two reasons: an expected well-defined reason (eof), and an unexpected undefined reason (error). Labelling the well-defined reason as 'false' and the undefined reason as 'null' is really quite defendable.
This isn't something I'd like to see changed. I actually think there are probably lots of people who do !== false and we could screw up a lot of scripts. I see the advantage of being able to tell the difference but I think it's not big enough to change it now. Andi

« previous php.internals (#4920) next »