Forum Discussion

vbandi's avatar
vbandi
Contributor
9 years ago

Get replies counts along with Topic

Hi All,   I was trying to get count of replies  along with Root Topic. (Or count of child items when i am trying to retrieve parent)   For example :- To get root Topic i have used LiQL as below...
  • ChhamaJ's avatar
    ChhamaJ
    9 years ago

    Hi vbandi,

     

    You cannot combine  '*' and any other field in the LiQL query. If you need to get replies.count(*) along with other fields then you will have to specify all the fields individually.  For example, 

    Select id, board, subject, author, replies.count(*) from messages where board.id = 'tp' and depth=0

    In the above query, add all the fields that you need to be returned.

     

    Hope this helps.

     

    Regards,
    Chhama