K
Kysely14mo ago
tzezar

What is easiest way to get count alongside data for pagination?

I am running second query with raw sql SELECT COUNT(id) from table_name. is this legit?
Solution:
Here's one reusable way to get that done https://kyse.link/?p=s&i=5f2hXebbbH4P0VlNuShk
Jump to solution
3 Replies
Unknown User
Unknown User14mo ago
Message Not Public
Sign In & Join Server To View
Solution
koskimas
koskimas14mo ago
Here's one reusable way to get that done https://kyse.link/?p=s&i=5f2hXebbbH4P0VlNuShk
koskimas
koskimas14mo ago
You could even combine those two queries into a single query using CTEs if you want.

Did you find this page helpful?