Is it possible to paginate and display number of pages in Coldfusion using only one query?
My understanding is you can obviously paginate with one query, but you would need an additional query to create the pages. This is in order to calculate the total number of results.
(currentPage - 1) * resultsPerPage = Offset in MySQL
query. This logic is sufficient to create next/prev buttons. But in order to know the number of pages, would we not need to know the total number of results using a separate query, then a query of queries for the data?