Hi,

I have a store with categories, sub-categories and more sub-categories. I want that under the categories all products will be shown of the categorie and subcategories. How can i do this with a sql-statement.

For example:
Category a,
-product 1
-product 2
-product 3
-product 4
--Subactegory a1,
---product 5
---product 6
---product 7
----Subcategory a2,
-----product 8
-----product 9
-----product 10
------Subcategory a3,
-------product 11
-------product 12

So when I click on category a I will see product 1 to 12
when i click on Subactegory a1 I will see product 5 to 12
when i click on Subactegory a1 I will see product 8 to 12
when i click on Subactegory a1 I will see product 11 to 12

And of course the samewith category b, b1, b2, c, c1.....

I can do this manually by linking products. But that is a lot off work, it must be done, that this goes automatic.

Who can help me with this?