Click here to Skip to main content
16,021,687 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi
I am doing MLM web project, I should display user information data in binary tree structure. Here each parent node have two child node like left and right again each child node contain two child nodes and again vise versa , I should display all the user info like this from sql database.

please help me how to create binary tree.
Posted
Updated 28-Mar-11 22:40pm
v2

1 solution

Table Structure is

PersonID ParentID LChildID RChildID

Id Parent ID is null Then Its a Root
If Left Or Right ID is null Then its can add new Child.

All the best.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900