Help on Querying Specific Products from a table
Having a category table like this:
and a product table like this:
Let's say we have several products that belong to a specific category, and that category, belongs to a specific parent category, and we want to list all products that belong to that parent category.
1 - House
2 - Car
2.1 europe (parent_id_cat 2)
2.2 us (parent_id_cat 2)
Opel (id_cat = 2.1)
Ford (id_cat = 2.2)
We can select all cars where id_cat = 2.1, but what if we want to retrieve all cars where the parent_id_cat is equal to 2 ?