Re: DB oci8 numRows() and portability
| From: | Lukas Smith | Date: | Sat, 17 Jan 2004 09:01:19 +0000 |
| Subject: | Re: DB oci8 numRows() and portability | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-25113@lists.php.net to get a copy of this message | ||
Daniel Convissor wrote:
Hi Folks:
Oracle's numRows() method is quite odd. Right now, if optimize isn't set to portability, the method raises an error about the backend not being capable. Well, if the person is calling the method, they want the answer, right? So, why even waste time with an if statement? Just give them the answer!The reasons is that someone writes an app that is supposed to work with multiple backends but they have their own custom fall back if numRows fails. For example they could then just fetch the entire result set into a buffer etc.
This if statement really should be eliminated. It would cut the need for another portability option in the new system, thus saving memory and processor time (let alone people's time figuring out and remembering the dang thing).I dont think it should be removed. And actually that would be yet another BC break :-) regards, Lukas