I'm sure this is easy - if someone could give me a push in the right
direction I would apprieciate it!
If you have multiple categories
CatID - NAME - ParentID
1 root 0
2 fruit 0
3 veg 0
4 apple 2
5 orange 2
6 corn 3
7 peas 3
8 navel 5
9 sunkist 5
10 sweet 6
What type of query do I use to find out the root category of "navel"
(catID 8) - I know that it's 2 but I'm not sure how the code works...
Any help on this would be greatly apprieciated!!! !
direction I would apprieciate it!
If you have multiple categories
CatID - NAME - ParentID
1 root 0
2 fruit 0
3 veg 0
4 apple 2
5 orange 2
6 corn 3
7 peas 3
8 navel 5
9 sunkist 5
10 sweet 6
What type of query do I use to find out the root category of "navel"
(catID 8) - I know that it's 2 but I'm not sure how the code works...
Any help on this would be greatly apprieciated!!! !
Comment