hey, i am newbie , need help in creating a php script which can count the no. of members in a binary downline, the fields in the database are like this:
id name ref_id
1 kundan 0
2 rahul 1
3 deepak 2
4 chandan 2
5 avi 3
6 ajit 3
7 punit 4
8 sunil 4
the tree will grow to abt ten thousands of members, i trying to work it out by using recursive functions(using a while loop), and i am able to print the downline as a list, but the problem is that i've to calculate the no. of members. can anyone help...