|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #23725 bug in callback fecthRow Sybase
Submitted: 2003-05-20 14:33 UTC Modified: 2003-06-21 12:22 UTC
From: cristianoarnold at yahoo dot com dot br Assigned: ssb (profile)
Status: Closed Package: PEAR related
PHP Version: 4.3.1 OS: Windows 2000
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: cristianoarnold at yahoo dot com dot br
New email:
PHP Version: OS:


 [2003-05-20 14:33 UTC] cristianoarnold at yahoo dot com dot br

I had some trouble when I tried call next time the following fetchRow:

$array = $result->fetchRow(DB_FETCHMODE_ASSOC, $i++);

It returns the result coorect but printed the message follow and exit

Warning: sybase_data_seek() [function.sybase-data-seek]: Sybase: Bad row offset in c:\php\pear\DB\sybase.php on line 287

The problem seems to be the following lines of code starting at line 287 of DB/sybase.php

       if ($rownum !== null) {
            if (!sybase_data_seek($result, $rownum)) {
                return $this->sybaseRaiseError();

The following change seems to fix the problem.

       if ($rownum !== null) {
            if (($rownum >= 0) && ($rownum <= $this->numRows($result))) {
                @sybase_data_seek($result, $rownum);
            } else {
                return $this->sybaseRaiseError();

Can you fix this problem in the library to next version?

Than you


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-06-21 12:22 UTC]
Fixed in CVS, will be shipped in next PEAR DB version.

Thanks for the report
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Mon Sep 27 14:03:37 2021 UTC