Jay, I am querying an Informix database, not MySQL. When I count the rows against my MSSQL database I do use the mssql_num_rows function and it works great. I tried using the ifx_num_rows function with the ifx_fetch_row function but could not seem to get it to work, so instead I used the ifx_affected_rows function to return the query count. On 6/10/08, Jay Blanchard <jblanchard@xxxxxxxxxx> wrote: > > [snip] > I am having a problem with trying to count the number of rows returned > by my > query. I connect to the database fine, my query displays and runs fine, > but > my row count is incorrect. > > If I do not put in any serch criteria and my basic query ends up being > "SELECT * FROM brev_pending_summary_detail" then the value of $rowcount > is > 110796. If one search criteria is used the value of $rowcount becomes > 11080. > If both criteria are used the value of $rowcount is 1108. 110796 is the > correct value of my total rows in the table, but the other two values > are > inncorrect and appear to just be one digit shorter and rounded off. > [/snip] > > http://www.php.net/mysql_num_rows > >