trouble restricting results.
I have a grandparent, parent and child relationship. Each is a business_id. each business may (or may not), have a stylesheet record in the second table.
I will be entering an id to the WHERE clause. I need to bring back those ids on senior levels, which do have a record in table_2.
so, if a child_id is say 32 and its parent records each has a record in table_2 (AND the live_or_dev col is 'live'), I need to get those ids, in order from grandparent->parent->child - or even grandparent->child OR grandparent->parent. Just whatever ids have a stylesheet
I can't get my head around it but it seems to be join issue but I am not sure.