Hi there,
I have problems with outputting a list of products and 'subproducts'.
My database table looks like this:
ID - ParentID - Description
ID= unique ID
Parent ID = the referring ID if it's a 'subproduct'.
E.g.:
1 - 0 - Software
2 - 0 - Hardware
3 - 1 - Games -> 1 indicates Games is a sub of Software
4 - 1 - Financial
So far no problems, but I also have sub-subcategories.
E.g.:
5 - 3 - Strategy Games -> here the 3 indicates it's a sub category of the subcategory Games.
Presented in another layout:
1. Software
1.1 Games
1.1.1 Strategy Games
How can I create a layout that gives me this layout automatically, knowing that the number of sublevels is NOT restricted to a certain number.
And considering I 'only' have 3 fields in my database table:
ID - Parent - Description.
Any help MORE than welcome!
Bram
I have problems with outputting a list of products and 'subproducts'.
My database table looks like this:
ID - ParentID - Description
ID= unique ID
Parent ID = the referring ID if it's a 'subproduct'.
E.g.:
1 - 0 - Software
2 - 0 - Hardware
3 - 1 - Games -> 1 indicates Games is a sub of Software
4 - 1 - Financial
So far no problems, but I also have sub-subcategories.
E.g.:
5 - 3 - Strategy Games -> here the 3 indicates it's a sub category of the subcategory Games.
Presented in another layout:
1. Software
1.1 Games
1.1.1 Strategy Games
How can I create a layout that gives me this layout automatically, knowing that the number of sublevels is NOT restricted to a certain number.
And considering I 'only' have 3 fields in my database table:
ID - Parent - Description.
Any help MORE than welcome!
Bram