• I don't have your tables, bat I can try to help you.

    I would try to use for exampl>   SELECT * FROM table WHERE parents IN(SELECT parents FROM table_parents WHERE (....) )