I got 2 tables:
1 Category
- cID
- Name
- Active
2 Products
- pID
- Name
- category_id
- active
This is want i want: I want a list from categories that ONLY have ACTIVE products.
Thanks in advance
SOLUTION: SELECT DISTINCT category.* FROM category INNER JOIN products ON category.id = products.c_id WHERE products.active = 0 ORDER BY category.id DESC