what is the best way to count a the number of results from a mysql query?
Is it best to do one query, and then mysql_num_rows($query)
or is it best to do two queries, one a count query ( SELECT count(*) FROM whatever) and then the other query as normal?
AJ, it really depends on what your query is doing? If you were trying to get the total number of records in order to split the results amongst pages then you would want to use two queries. If all you are doing is querying the db for some results and you want to diplay and print the number of total results, one query would be just fine.