Pradnya
7 years agoGuide
I want to know whether category has forums or ideas in it
I want to know whether particular category has forums or ideas or both using API V1 or V2 call .
Thanks in advance
Pradnya -
Below query will work for both idea and forums. If the count is more than 0, it means it has idea or forum inside it.
SELECT count(*) FROM boards WHERE parent_category.id = 'categoryID'
Just to check only for ideas and forums
SELECT count(*) FROM boards WHERE parent_category.id = 'categoryID'
SELECT count(*) FROM boards WHERE parent_category.id = 'categoryID' AND conversation_style = 'idea' or conversation_style = 'forum'