Subject Re: [firebird-php] # of Rows returned by a select?
Author Lester Caine
Steve Harp wrote:

> I need to determine how many rows were returned by ibase_query() in a
> select statement (ie select NAME from mytable). The
> ibase_affected_rows() seems to always return zero with a select and
> the ibase_query() returns True even when a null result set is returned.

If you need a count of something, then 'SELECT COUNT( X ) FROM Y WHERE
Z' to get it, then the query you run into the ibase_query() select can
be filtered to just provide the subset you actually want to display ;)

I tend to run a COUNT, and follow it with a 'SELECT FIRST 10 SKIP X'
based on the results of the count. So a total returned by the query is
not much use :)

Lester Caine
L.S.Caine Electronic Services