Forum Discussion
OlivierS
9 years agoLithium Alumni (Retired)
dustin I haven't checked the documentation but I think you can use the clause 'IN', so:
SELECT * FROM messages WHERE category.id IN ('xxxxxxxx','yyyyyyyy','zzzzzzzz') AND depth=0 ORDER BY post_time DESC LIMIT 15
It's not the best has you might add categories in the future, or you might have a long list of categories ...
Another option is to run your request for all categories, then add a if statement to eliminate everything from your test category.
SELECT * FROM messages WHERE depth=0 ORDER BY post_time DESC LIMIT 15
This isn't the correct freemarker syntax, just an idea: if message.board.id != 'test' then {do what you want to do with your messages }
Related Content
- 2 years ago
- 4 years ago