Bug #15600 Updated: ifx_fetch_row return the same tuple more than once
| From: | sniper@php.net | Date: | Tue, 09 Jul 2002 02:58:04 +0000 |
| Subject: | Bug #15600 Updated: ifx_fetch_row return the same tuple more than once | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-13563@lists.php.net to get a copy of this message | ||
ID: 15600
Updated by: sniper@php.net
Reported By: keeper@fly.srk.fer.hr
-Status: Open
+Status: Closed
Bug Type: Informix related
Operating System: Solaris 7
PHP Version: 4.1.1
New Comment:
This bug has been fixed in CVS. You can grab a snapshot of the
CVS version at http://snaps.php.net/. In case this was a
documentation
problem, the fix will show up soon at http://www.php.net/manual/.
In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2002-07-08 14:30:36] danny.heijl@cevi.be
According to Daniel Musante (danimu@hotmail.com) this is the fix:
<quote>
ifx.ec in the last version of php is missing in the
function "ifx_query" the line:
EXEC SQL set connection :ifx;
after the line 777
775 sprintf(descrpid, "descrp%x", IFXG(cursorid));
776
777 PHP_IFX_CHECK_CONNECTION(ifx);
778
779 EXEC SQL PREPARE :statemid FROM :statement;
780
</quote>
I don't know who removed it, or why.
Danny
---
------------------------------------------------------------------------
[2002-06-20 08:28:12] keeper@fly.srk.fer.hr
I tried using ifx_fetch_row($rid) (without NEXT or FIRST) but the
problem remains.
------------------------------------------------------------------------
[2002-06-20 07:31:17] derick@php.net
From the manual:
position is an optional parameter for a "fetch" operation on "scroll"
cursors: "NEXT", "PREVIOUS", "CURRENT", "FIRST",
"LAST" or a number. If
you specify a number, an "absolute" row fetch is executed. This
parameter is optional, and only valid for SCROLL cursors.
You're not using a SCROLL cursor (no parameter to ifx_prepare).
Just use ifx_fetch_row($rid) (without NEXT) and it should work fine.
Please test this, and report back.
Derick
------------------------------------------------------------------------
[2002-06-20 06:55:33] keeper@fly.srk.fer.hr
php 4.2.1 has the same problem.
------------------------------------------------------------------------
[2002-02-20 04:17:51] keeper@fly.srk.fer.hr
Of course. Here it is:
$conn_id=ifx_connect ("prirodo2@nippurtcp", "user",
"password");
if (! $conn_id) {
echo "<b>Ne mogu se spojiti na bazu</b>";
exit;
}
$rid = ifx_prepare ($select, $conn_id);
if (! $rid) {
printf("Došlo je do pogreške u radu\n");
zavrsi($conn_id);
}
if (! ifx_do ($rid)) {
printf("Ne mogu izvršiti upit nad bazom
podataka\n");
zavrsi($conn_id);
}
$row = ifx_fetch_row ($rid, "FIRST");
while (is_array($row)) {
for (reset($row); $fieldname = key($row); next($row))
{
$rez = array_values($row);
echo $rez[0];
}
$row = ifx_fetch_row ($rid, "NEXT");
}
$rowcount = ifx_num_rows($rid);
ifx_free_result ($rid);
ifx_close ($conn_id);
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/15600
--
Edit this bug report at http://bugs.php.net/?id=15600&edit=1