RE: [PHP-DEV] database driver: no more rows

From: Date: Wed, 22 Oct 2003 17:59:05 +0000
Subject: RE: [PHP-DEV] database driver: no more rows
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-4917@lists.php.net to get a copy of this message
> From: Ard Biesheuvel [mailto:abies@php.net] > Sent: Wednesday, October 22, 2003 7:56 PM > To: internals@lists.php.net > Subject: Re: [PHP-DEV] database driver: no more rows > > >>I wouldn't mind such a change myself, however what about all the > >>installations > >>where people do while (*fetch_row() !== false) ? > > Wouldn't it be a lot easier to do it the other way around ? > I mean, the semantics of returning false when a fetch cannot be executed > because aren't any rows left is perfectly clear, and returning NULL when > the result cannot be determined (because of an error) is also better > than returning any other value (like 'false'). > > This would also be easier to carry out while maintaining BC. Err .. I don't agree. Null means no data False means error. Regards, Lukas

« previous php.internals (#4917) next »