Create a Tree in php mysql with specific conditions
I'm working on a MLM project, But the problem is, I don't have proper logic to built a tree lik开发者_运维百科e this. i have uploaded the screen shot of tree here, please view it, how tree should be built
i have a form where user will enter the referal_id at the time of sign up, and the new user should get inserted into the referal_id(S) tree in the same way as tree is growing.
Please help with some algorithm or some good code, that can solve my problem :-(
http://snipplr.com/view/22864
Here you have an example how you build a tree in php.
精彩评论