ryancjmp
2 years agoAce
liql query for message replies
I'm trying to get the replies from an event via liql. My query looks like
<#assign comments = liqladmin("SELECT * FROM messagess WHERE parent.id = '25324') />
This query is returning an empty array. But I know for a fact that there are comments under the message with id = 25324. For example, if I query one of the replies by it's id directly, I see that the message has a parent.id of 25324.
Are there some special permissions that are needed in order to query for replies? Or am I missing something?
Ok I think I've solved this. I had to include a board id in order for it to work.
SELECT * FROM messages WHERE parent.id = '25324' AND board.id = 'the-board-where-the-parent-lives'
This query is now returning what I expected.
I didn't see this requirement in the documentation anywhere. Did I just miss it?