This is a good summary of SQL useful in this situation:

http://www.oreilly.com/catalog/sqlpr/chapter/ch01.pdf

On 5/18/07, Rey Bango <[EMAIL PROTECTED]> wrote:
> Guys, its been awhile since I've done tree/hierarchical SQL manipulation
> so I need some help. The data looks something like this:
>
> parent_member_id        member_id       Level
>         1       2       1
>         1       3       2
>         2       4       1
>         3       5       1
>         4       6       1
>         4       7       2
>
> In this scenario, I would be trying to find all downline members of a
> specific parent id. For example:
>
> If I wanted to see all downline members for parent_member_id 1, it would be:
>
> 2,3,4,5,6,7
>
> If I wanted to see all downline members for parent_member_id 2, it would be:
>
> 4,6,7
>
> If I wanted to see all downline members for parent_member_id 3, it would be:
>
> 5
>
> If I wanted to see all downline members for parent_member_id 4, it would be:
>
> 6,7
>
> Any guidance on this would be helpful. I've tried Googling this but to
> no avail.
>

-- 
mxAjax / CFAjax docs and other useful articles:
http://www.bifrost.com.au/blog/

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Deploy Web Applications Quickly across the enterprise with ColdFusion MX7 & 
Flex 2
Free Trial 
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:278556
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to