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 Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or 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

Add a Patch

Pull Requests

Add a Pull Request

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: Tue Apr 16 23:01:30 2024 UTC