This is pretty trivial, but I noticed on SO that instead of an offset they are using page numbers. I know the difference is minor (multiply the page number by rows on a page or divide offset by rows on a page), but I'm wondering if one is recommended over the other.
Some sites, like Google, of course use a more complicated system because they need to track your actual search. But I'm thinking for a simple site where this doesn't matter.
What is the recommended technique?
Use offsets. If you choose to allow variable (or user-defined) number of results per page, the coding is easy.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With