Posted by Michael Fesser on 02/02/07 15:40
..oO(Phil Latio)
>As you can see Batley, Leeds and Bradford are sub-categories of West
>Yorkshire which itself is a sub-category of England.
>
>What I want to display when I am browsing through sub-categories of links is
>not only the name of that sub-category but it's category's parents, grand
>parents and so on like the below example.
Unfortunately you can't do that with a single SQL statement (unless you
use a nested set structure, but that would be real overkill). You have
to walk up the tree in a loop and fetch every parent node until you
reach the root node.
Micha
Navigation:
[Reply to this message]
|