From:             [EMAIL PROTECTED]
Operating system: Sun OS
PHP version:      4.0.6
PHP Bug Type:     FrontBase related
Bug description:  Bad results with fbsql_num_rows

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"


Edit bug report at:

PHP Development Mailing List <>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to