in reply to threaded display of replies
However, and where it will get messy, is to take the child node, find it's parent (and all nodes in between), then increament on the node number starting with the ultimate parent node; if the parent of that node is one that is in the thread already, add it to the thread. This will get trees like:
Without increamenting on the node number, you cannot get 6, 7 and 8. Nor would you get 2.P +--1 +--2 +--3 +--4 +--5 <- the current node +--6 +--7 +--8
|
|---|