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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
16 - 13 = ?
Subscribe to this entry?

 
 [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: Thu Apr 25 09:01:29 2024 UTC