Bug #17872 Updated: ifx_fetch_row return the same tuple more than once

From: Date: Thu, 20 Jun 2002 10:52:17 +0000
Subject: Bug #17872 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-11539@lists.php.net to get a copy of this message
ID: 17872 Updated by: mario.pranjic@irb.hr Reported By: mario.pranjic@irb.hr -Status: Bogus +Status: Open Bug Type: Informix related Operating System: Sun Solaris 7 PHP Version: 4.2.1 New Comment: I wanted to list the reseults from the query from the database. I got one tuple as a result. ifx_num_rows returns 1 at the end of the listing the results. But, I got 4 same tuples on the output. I used the structure for ifx_fetch_row as described in the example in documantation. The structure: $row = ifx_fetch_row ($rid, "FIRST"); while (is_array($row)) ... is not working properly... This was all working just fine in php 4.0.5 The example: $conn_id=ifx_connect ("database@servertcp", "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&#353lo je do pogre&#353ke u radu\n"); zavrsi($conn_id); } if (! ifx_do ($rid)) { printf("Ne mogu izvr&#353iti 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); Previous Comments: ------------------------------------------------------------------------ [2002-06-20 06:49:58] derick@php.net That one is still open, and this bug report doesnt provide any information -> bogus (all more information to the first report in the future). Derick ------------------------------------------------------------------------ [2002-06-20 06:45:18] mario.pranjic@irb.hr Ever since version 4.0.5, Informix driver seems to be broken. For further information, please look at the bug: http://bugs.php.net/bug.php?id=15600 that I submitted on 18th February this year. Hope that someone will finally fix informix driver. I'm not the only loser using informix-php combination, am I? ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=17872&edit=1

« previous php.bugs (#11539) next »