PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Database » DB » Bug #598

IFX fetchrow() broken

Details

Submitted2004-01-19 16:51 UTC
Fromandres at alleati dot com
Assigneddanielc
StatusClosed
PackageDB
PHP Version4.3.2
OSwin2000
Roadmaps(Not assigned)

Comments

[2004-01-19 16:51 UTC] andres at alleati dot com

Description:
------------
While testing some code using the ifx driver, i noticed that fetchRow() returned the same row everytime it was called. I went to the file ifx.php and changed the call to "ifx_fetch_row" in the "fetchInto" method:
line 227: if (!$row = @ifx_fetch_row($result, $rownum)) {
to
if (!$row = @ifx_fetch_row($result, "NEXT")) {

I am pretty sure this is not the way to solve it but it is what i did untill there is an official bugfix.

Reproduce code:
---------------
[...]
$dsn = "ifx://user:pass@host/dbname";
[...]

while ($row = $result->fetchRow()){
echo $row['id'].'<br>';
}

Expected result:
----------------
16<br>
17<br>
18<br>
19<br>
20<br>
21<br>

Actual result:
--------------
16<br>
16<br>
16<br>
16<br>
16<br>
16<br>
16<br>
16<br>
16<br>
16<br>
16<br>
(untile time out is reached)