|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #13131 Bad results with fbsql_num_rows
Submitted: 2001-09-04 09:03 UTC Modified: 2001-11-18 08:35 UTC
From: olivier dot marie at ulysse dot u-bordeaux dot fr Assigned:
Status: Closed Package: FrontBase related
PHP Version: 4.0.6 OS: Sun OS
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: olivier dot marie at ulysse dot u-bordeaux dot fr
New email:
PHP Version: OS:


 [2001-09-04 09:03 UTC] olivier dot marie at ulysse dot u-bordeaux dot fr
The number of rows returned by fbsql_num_rows is wrong when used with 'select DISTINCT' query. This script shows differences between fbsql_num_rows function and a while over all rows. This problem doesn't appear if you don't use the 'distinct' option.

fbsql_select_db("mybase",$conn)	;
$sql = "select distinct id_actor from actor_table;";
$result=fbsql_query($sql,$conn) ;

$num_rows = fbsql_num_rows($result); 
echo "$num_rows Rows\n";// displays "2147483647 Rows"

while ($row=fbsql_fetch_array($result)) 
echo "$i Rows\n";	// displays "5 Rows"



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-11-03 13:17 UTC]
Please try the latest version of PHP from CVS or the latest snapshot from There was a patch regarding your problem a few days ago.
 [2001-11-18 08:35 UTC]
No feedback -> Closing. 

Please reopen, if the problem persists.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 09:01:27 2024 UTC