|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #9218 can ibase_num_rows be implemented?
Submitted: 2001-02-11 16:26 UTC Modified: 2001-02-11 17:05 UTC
From: blib at mail dot com Assigned:
Status: Closed Package: Feature/Change Request
PHP Version: 4.0.4pl1 OS: N/A
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.
Block user comment
Status: Assign to:
Bug Type:
From: blib at mail dot com
New email:
PHP Version: OS:


 [2001-02-11 16:26 UTC] blib at mail dot com
Is there any chance that ibase_num_rows would be implemented? Or some other function that will let you know number of rows returned by query.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-02-11 16:41 UTC]
Feature request, not a bug
 [2001-02-11 17:05 UTC]
No chance. InterBase just doesn't return the number of
records in recordset, so there's no way to implement it
without actually fetching all the rows (which is not going
to happen in the extension level). You might consider
writing a wrapper in PHP and storing the results temporarily
into an array, if you can't live without this feature.
 [2012-06-27 14:54 UTC] oliverhdzrangel at gmail dot com
From the Firebird FAQ

How to get record count for any query without executing it?

Sometimes you just want to see how many records would some query produce, without actually fetching them all. With Firebird 2 and derived tables it's quite easy:

SELECT COUNT(*) FROM ( your select query );

For example:

SELECT COUNT(*) FROM ( select * from employee where emp_no > 8 );

In earlier versions (1.x) of Firebird you should either rewrite the query to get the record count, or create a view and do SELECT COUNT(*) from it. For example:

create view my_employees as select * from employee where emp_no > 8;
SELECT COUNT(*) FROM my_employees;
drop view my_employees;
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sun Dec 05 18:03:37 2021 UTC