I have the following two tables
table_ads
ad_id ad_category_id ad_name
1 1,2,3,4 g
2 2,4,6 f
3 1,3,5 s
4 2,4 e
table_categories
category_id category_type
1 2
2 0
3 1
4 0
5 2
6 0
I would like to see all the rows of the ads table. But if there is an category_type that is not 0 but higher, then the ad shouldn’t be included.
I would like to do this with mysql join, but I can’t get it done.
Is this even possible?