Forums

get all sub categories of a certain category from certain posts of a category (4 posts)

  1. Phil.trash
    Member
    Posted 1 year ago #

    Hi all,

    Confusing title, and confusing problem..
    Here's the thing:

    I have 2 main categories (Topic (cat_id = 3) and Source (cat_id = 13)), each category having about 5 subcategories (Let's say SubTopic 1 to 5 (parent cat_id = 3) and SubSource 1 to 5 (parent cat_id = 13)).

    Every post has one SubTopic category, but possibly multiple SubSource categories.

    What I want is the possibility to check, for every SubTopic the available SubSource according to all posts that have the same SubTopic..

    for example:
    - Post A has SubTopic 1 and SubSource 1 + SubSource 2
    - Post B has SubTopic 1 and SubSource 5
    - Post C has Subtopic 2 and SubSource 1 + SubSource 4

    What I want to know is what to display is (I don't care about which posts, just the SubSource categories):
    - Subtopic 1 has Subsource 1 + SubSource 2 + SubSource 5
    - Subtopic 2 has Subsource 1 + SubSource 4

    Is there an easy way (or even a hard one) to get this? I really can't see how..

    Any help would be much appreciated! Thanks!
    Phil

  2. MAS
    Member
    Posted 1 year ago #

    there have any relationship between Tropic and Source. I saw that only post made the relationship with Tropic and Source respectively. But have no relationship between tropic and Source.

    Am I correct?

  3. Phil.trash
    Member
    Posted 1 year ago #

    That is correct, the only eventual links between Topic and Source are the posts themselves.

  4. Phil.trash
    Member
    Posted 1 year ago #

    I guess there is indeed no easy solution for this one..

Topic Closed

This topic has been closed to new replies.

About this Topic