News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Paginate Query Results

Started by Stanyy, October 27, 2018, 05:05:01 AM

Previous topic - Next topic

Stanyy

Hi,

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

Regards

Arantor

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.

Advertisement: