|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #15342 Informix ifx_num_rows
Submitted: 2002-02-02 06:44 UTC Modified: 2003-02-26 09:21 UTC
Avg. Score:4.0 ± 0.8
Reproduced:2 of 2 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: manente at interlogica dot it Assigned:
Status: Closed Package: Informix related
PHP Version: 4.0.6 OS: linux Mandrake 8.1
Private report: No CVE-ID: None
 [2002-02-02 06:44 UTC] manente at interlogica dot it
$connid=ifx_connect("dbnamw@ol_frzz", "informix", 
"zzzzz") or die("Error"); 

$result = ifx_query("SELECT * FROM tabel", $connid) or 

$rc = ifx_num_rows($result); 
echo $rc; // <--- $a is always 0 



The result of ifx_num_rows($result) is always 0! 


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-09-18 02:59 UTC] chuakialoong at yahoo dot com
Dear PHP Developer,

I am facing same problem with ifx_num_rows() as well. It always return Zero.

(1) PHP Syntax:
$conn_id  = ifx_pconnect($dbname, $dbuser, $dbpass) OR die ("Connection error!");

$res_id   = ifx_query($sql_stat, $conn_id) OR die ("SQL Error!");

#-- It always return 0, even there is records found --#
echo "Numrow = " . ifx_num_rows($res_id);

(2) This is my spec:
HP-UX 11.00
Informix Dynamic Server Version 7.31.UC6AX7
Informix CSDK 2.40.HC1
INFORMIX-ESQL Version 9.30.HC1
PHP 4.1.2 release
Apache 1.3.23

(3) Appreciate if this bug (if it has been justified as bug) can be fixed as soon. Thank you.

 [2002-10-20 01:45 UTC]
Please try using this CVS snapshot:
For Windows:

 [2003-02-26 09:21 UTC]
Informix doesn't have support for returning the number of rows in a result set/cursor. The closest thing to it is to use sqlerrd[3] which is IMHO an inaccurate estimate.

ifx_num_rows() returns the number of rows processed or retrieved by ifx_fetch_row()

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed May 22 22:01:32 2024 UTC