How to list groupings and keep pagination

I solved this by keeping my three separate queries and building a complex system to handle paging manually. It’s not ideal, but I really saw no better way to do it.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)