Advertisement:

Author Topic: Paginate Query Results  (Read 1429 times)

Offline Stanyy

  • Jr. Member
  • **
  • Posts: 278
Paginate Query Results
« on: October 27, 2018, 05:05:01 AM »
Hi,

I have written queries using $smcFunc['db_query']. How do I paginate these results?

Regards

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 70,992
    • StoryBB/StoryBB on GitHub
Re: Paginate Query Results
« Reply #1 on: October 27, 2018, 06:08:09 AM »
You use a LIMIT clause in the SQL itself and pass in how many items to skip and how many items to retrieve just like the rest of SMF does.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.