php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #56634 ingres_num_rows clears resultset
Submitted: 2005-11-09 18:05 UTC Modified: 2008-03-11 10:49 UTC
From: josh dot ferrell at ugs dot com Assigned: grantc (profile)
Status: Closed Package: ingres (PECL)
PHP Version: 4.3.10 OS: Red Hat Linux
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:
18 + 7 = ?
Subscribe to this entry?

 
 [2005-11-09 18:05 UTC] josh dot ferrell at ugs dot com
Description:
------------
After calling ingres_num_rows, ingres_fetch_* commands return no rows.

Reproduce code:
---------------
ingres_query("select count(id) from users"); // 20 rows
echo(ingres_num_rows()); //<- this clears resultset

$row = ingres_fetch_array()
echo($row[0]);


Expected result:
----------------
20
20

Actual result:
--------------
20
null

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-11-10 04:22 UTC] grantc@php.net
Hi Josh,

Unfortunately this is the expected, rather than the desired, behaviour. The underlying API call made to get the row count is designed for getting the number of affected rows by an update/delete query.

If you want we can discuss this further next week in Las Vegas.

regards

grant
 [2008-03-11 10:49 UTC] grant dot croker at ingres dot com
This has been addressed in the latest release of the driver when running against Ingres 2006 release 3.

regards

grant
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Jun 16 20:01:28 2024 UTC