954,585 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Binary Tree - How to get total left and right children?

I am currently making a binary tree and I was able to create the tree. What I am facing now is " How to get the total number of children in my left side and total number in my right side ".

The structure is:

1
                                      2                                       3
                          4                  5                   6                     7
                      8       9        10     11         12    13          14    15

My database variables for each person is Position and Upline
Any help is appreciated. God Bless!

codewalkz
Junior Poster in Training
51 posts since Nov 2009
Reputation Points: 10
Solved Threads: 2
 

I am currently making a binary tree and I was able to create the tree. What I am facing now is " How to get the total number of children in my left side and total number in my right side ".

The structure is:

1
                                      2                                       3
                          4                  5                   6                     7
                      8       9        10     11         12    13          14    15

My database variables for each person is Position and Upline Any help is appreciated. God Bless!

use COUNT members WHERE placement = left/right AS left/right total

bobbymoir
Light Poster
25 posts since Dec 2009
Reputation Points: 10
Solved Threads: 2
 

Got it through this.. http://articles.sitepoint.com/article/hierarchical-data-database/2 Thanks for the replies..

codewalkz
Junior Poster in Training
51 posts since Nov 2009
Reputation Points: 10
Solved Threads: 2
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: