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

From: Date: Thu, 20 Jun 2002 10:55:33 +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-11541@lists.php.net to get a copy of this message
ID: 15600 Updated by: keeper@fly.srk.fer.hr Reported By: keeper@fly.srk.fer.hr Status: Open Bug Type: Informix related Operating System: Solaris 7 PHP Version: 4.1.1 New Comment: php 4.2.1 has the same problem. Previous Comments: ------------------------------------------------------------------------ [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&#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); ------------------------------------------------------------------------ [2002-02-19 14:09:26] sander@php.net Can you provide a simple, self-contained (byt complete) sample script? ------------------------------------------------------------------------ [2002-02-19 03:25:31] keeper@fly.srk.fer.hr 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... As I already pointed out, it was all working just fine in php 4.0.5 ------------------------------------------------------------------------ [2002-02-18 11:32:31] sander@php.net Not enough information was provided for us to be able to handle this bug. Please re-read the instructions at http://bugs.php.net/how-to-report.php If you can provide more information, feel free to add it to this bug and change the status back to "Open". ------------------------------------------------------------------------ [2002-02-18 11:01:51] keeper@fly.srk.fer.hr ifx_fetch_row return the same tuple more than once. This bug is also present in php 4.1.0. In php 4.0.5 everything works just fine. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=15600&edit=1

« previous php.bugs (#11541) next »