Home » Database » DB » Bug #598
IFX fetchrow() broken
Details
| Submitted | 2004-01-19 16:51 UTC |
|---|---|
| From | andres at alleati dot com |
| Assigned | danielc |
| Status | Closed |
| Package | DB |
| PHP Version | 4.3.2 |
| OS | win2000 |
| 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)