Re: DB/mysql.php update
| From: | Paul Rees | Date: | Wed, 28 Mar 2001 13:05:09 +0000 |
| Subject: | Re: DB/mysql.php update | ||
| References: | 1 2 3 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-125@lists.php.net to get a copy of this message | ||
>> The addition of:
>>
>> if ($rownum !== NULL) {
>> return $this->raiseError(DB_ERROR_NOT_CAPABLE);
>> }
>>
>> ... into the fetchInto function in oci8.php has re-introduced the
>> problem I mentioned yesterday. Changing the above test to:
>>
>> if ($rownum != NULL)
>>
>> ... fixes it for me.
>
>The problem probably resides in DB.php. Because the note from Jon about
>the unreadability of putting 0 as default $rownum param, I prefered to
>use null values. But this didn't change in DB.php.
>Probably the fix is:
>DB.php
>------
>function fetchRow($fetchmode = DB_FETCHMODE_DEFAULT, $rownum=null)
>and
>function fetchInto(&$arr, $fetchmode = DB_FETCHMODE_DEFAULT,
>$rownum=null)
>{
> if ($fetchmode == DB_FETCHMODE_DEFAULT) {
> $fetchmode = $this->dbh->fetchmode;
> }
> return $this->dbh->fetchInto($this->result, $arr, $fetchmode,
>$rownum);
>}
>
>Please if you can test this, I'll can fix it this night.
Hi Tomas,
I've tested your fix and it works. Thanks.
>Sorry for the inconvenience and thanks for the useful reports.
My pleasure - thank you and everyone else for doing the hard work. I'm
pleased to be able to contribute in some way.
All the best,
--
Paul Rees