I am in the process of installing Interbase, to see if it will work for what I need to do. (Currently trying to switch from an NT/IIS/PHP/MS SQL system to Linux/Apache/php/interbase<?> system.)

Looking through the ibase php docs, I don't see a way to do a row count. I have a hard time believing there is not an function to do this. Am I missing something, or is there some trick I have not found?

There are many times when it is helpful to know how many results are returned!

Thanks,

-Pete

    The best way is to issue a query with a
    count function ie

    SELECT COUNT(*) FROM TABLE WHERE
    <PUT YOUR WHERE CLAUSE HERE>

    RETRIEVE THE RESULTING NUMBER FROM
    THE FIELD NAMED COUNT.

    ALTERNATIVE

    SELECT COUNT(*) AS MYCOUNT FROM TABLE
    WHERE ....

    THEN REFERENCE THE FIELD MYCOUNT.

    If you base you where clause on indexed
    columns you should get excellent performance.

    I haven't tried this yet, but see if you can
    set a plan with your sql statement to gaurantee performance.

    Joe Carney
    Palm Beach Gardens, FL

      6 months later

      I'm also in need of the ibase row_count function, if you hear anything please let me know.

        Write a Reply...