I am making a pagination function, here is my case:
1 table (example)
id | title | date | details
Now, I want to retrieve two different results from this table (example)
- Count all of the rows (for the total count of all the lists)
- I will only show every 10 list per page.
My current code is, I have 2 separated queries for 1 and 2, so it is like 2 connections, my question is, can this be done with a single query and then retrieve both of 1 and 2 results? If so, what do I need to do? Any suggestion/s can help me!