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!

Recommended Answers

All 2 Replies

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.