in reply to threaded display of replies

Assuming that all the data contains is the node number and the node number of the parent node, you simply cannot find all children; you can only work backwards up from a node to the parent.

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:

P +--1 +--2 +--3 +--4 +--5 <- the current node +--6 +--7 +--8
Without increamenting on the node number, you cannot get 6, 7 and 8. Nor would you get 2.


Dr. Michael K. Neylon - mneylon-pm@masemware.com || "You've left the lens cap of your mind on again, Pinky" - The Brain