php.net |  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
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:
41 - 26 = ?
Subscribe to this entry?

 
 [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.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-02-11 16:41 UTC] derick@php.net
Feature request, not a bug
 [2001-02-11 17:05 UTC] jah@php.net
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;
commit;
SELECT COUNT(*) FROM my_employees;
commit;
drop view my_employees;
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Apr 29 13:01:30 2024 UTC