I have a query that includes a LIMIT clause that returns say 10 results at a time out of a total of 100. What I want is also to count the total number of results (ie. 100). Do I have to do a second query without the LIMIT clause then count the number of rows returned? I dont want to do this as the query is quite expensive.
Share
Take a look at the manual
http://dev.mysql.com/doc/refman/5.0/en/information-functions.html#function_found-rows
that says: