Hello,

Having a category table like this:

Code:
id_cat
name_cat
description_cat
parent_id_cat
and a product table like this:
Code:
id_prod  	
id_cat 
nome_prod
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.

Categories:
1 - House
2 - Car
2.1 europe (parent_id_cat 2)
2.2 us (parent_id_cat 2)

Products:
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 ?


Please advice,

Kind Regards,
Márcio