Forum Discussion
Hi swamyandfriends,
To get the latest topics in a category you need to run the following LiQL query
SELECT * FROM messages where category.id = 'music' and depth=0 order by post_time desc
This will give you just the topics. If you need replies as well, just remove the depth=0 clause.
Hope this helps.
Regards,
Chhama
hi thanks for your reply ,
I found that the levels are categories as .
Categories -- > Inside categories there are many boards -- > inside boards there are many discussion topics .
If i want to get the discussion topics inside a specific category (not boards) , the above query which you said will help .
But , initially i need to get the list of categories . Can you help me to get that ?
Doubt:
If i use the above query , will i get all the topics in all the boards which are under music category ?
One more question :
Am getting the topics based on category id , will the category be deleted in the future ? If it is deleted how to handle these kind of cases ?
- ChhamaJ9 years agoKhoros Staff
To get the categories in a community, you need to do
Select * from categories OR Select id from categories
Regarding your doubt, yes you will get all the topics in all the boards under music category using the query provided.
If the category is deleted, then all the boards and topics under that category are also deleted (unless you move them before deleting the category in which case you will have to manually correct the query)
Hope this helps.
Regards,
Chhama
Related Content
- 8 months ago
- 9 months ago
- 2 years ago
- 3 years ago