I am curently working on the search feature for the site.
We of course know that it is posible to get a large amount of hits. I want to limit the hits to 25, but wouild like to be able to show x of Y (where Y is the total hits) but the query returns only the limit.
Is there something to do to get it to show me the total hits AND give the limited hits I want, without running a second querry to get just hits?
Bellow is an example of the query
query(): SELECT * FROM items WHERE item_name LIKE '%acr%' ORDER BY item_name LIMIT 0, 25;
query() returned 25 rows
We of course know that it is posible to get a large amount of hits. I want to limit the hits to 25, but wouild like to be able to show x of Y (where Y is the total hits) but the query returns only the limit.
Is there something to do to get it to show me the total hits AND give the limited hits I want, without running a second querry to get just hits?
Bellow is an example of the query
query(): SELECT * FROM items WHERE item_name LIKE '%acr%' ORDER BY item_name LIMIT 0, 25;
query() returned 25 rows
Comment