We have a PHP site and MySQL database added with many pictures and searche abilities. But we want to know how many rows a given query returns.
We use one query with a limit for every pageview, so when I use mysql_num_rows it returns the max of the limit.
(SELECT * FROM table LIMIT 0,25)
Should I make two queries, one with the limit and one without, or should I store all data in an array and handle the pageviews in PHP?