php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #6905 ifx_num_rows has an error
Submitted: 2000-09-27 16:35 UTC Modified: 2000-10-01 23:01 UTC
From: sir_john at gmx dot de Assigned:
Status: Closed Package: Informix related
PHP Version: 4.0.2 OS: Windows NT4 SP6
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: sir_john at gmx dot de
New email:
PHP Version: OS:

 

 [2000-09-27 16:35 UTC] sir_john at gmx dot de
The result of ifx_num_rows($result) is always 0!

<?

@$connid=ifx_connect"assdb@ol_assstat", "informix",
"xxx") or die("Error");

$result = ifx_query("SELECT * FROM ae ORDER BY idae", $connid) or die("Error");

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

ifx_free_result($result);

?>

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-09-27 16:40 UTC] sir_john at gmx dot de
The result of ifx_num_rows($result) is always 0!

<?

@$connid=ifx_connect("assdb@ol_assstat", "informix",
"xxx") or die("Error");

$result = ifx_query("SELECT * FROM ae ORDER BY idae", $connid) or
die("Error");

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

ifx_free_result($result);

?>

 [2000-10-01 23:01 UTC] danny@php.net
From the PHP manual on "ifx_num_rows()":
---------------------------------------
ifx_num_rows
(3.0.3 - 3.0.16 only, PHP4 )

ifx_num_rows -- Count the rows already *fetched* a query
Description

int ifx_num_rows (int result_id)


Gives the number of rows *fetched* so far for a query with result_id after a ifx_query() or ifx_do() query. 
----------------------------------------

Note "already fetched" and "fetched so far".

Your example hasn't fetched anything, so ifx_num_rows()
has to return 0.

Danny
---


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 10:01:29 2024 UTC