Forum Discussion

wearesocialit's avatar
8 years ago

Sorting TKB articles via API

We are developing a custom component that displays the first 6 TKB articles.
We want to control the order in which these articles appear, so I've set the ordering for the TKB (TKB admin > Ordering tab) as manual following this article
When i query the TKB via API the results are returned in reverse cronological order, not in the manual order specified in the admin.
This is the query I'm using:
 
SELECT * FROM messages WHERE board.id = 'BOARD-ID' LIMIT 6
 
I've tried different ORDER BY clauses, but the optimal solution would be to have the contents sorted manually in the admin backoffice.
 
Is there any way to achieve this?