ekuban 0 Newbie Poster

I m working on a MLM project in which i have to store member automatically in binary tree form like

1 is root
2 is child of 1
3 is child of 1

Then 4 is child of 2
5 is child of 2

6 is child of 3
7 is child of 3

then 8 is child of 4

and so on ......

I Want to Create a Downline in above Structure. Please Help me.

can any body help me