killervastu Posted November 9, 2011 Share Posted November 9, 2011 Hey guys, i am a college student and working on a project of mlm ad want to display the binary income tree,and also calculate the income that is given to each node. Please see the attachments for the binary tree structure and database table structure. Thanks. [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/250796-mlm-display-binary-tree/ Share on other sites More sharing options...
xyph Posted November 9, 2011 Share Posted November 9, 2011 Okay. Are we doing your homework for you, or are we helping you? Have you attempted this at all? Do you have any sample data, or just a table structure? Quote Link to comment https://forums.phpfreaks.com/topic/250796-mlm-display-binary-tree/#findComment-1286766 Share on other sites More sharing options...
killervastu Posted November 9, 2011 Author Share Posted November 9, 2011 Okay. Are we doing your homework for you, or are we helping you? Have you attempted this at all? Do you have any sample data, or just a table structure? Sir, I am just asking an idea to do that thing not the whole code. Quote Link to comment https://forums.phpfreaks.com/topic/250796-mlm-display-binary-tree/#findComment-1286770 Share on other sites More sharing options...
killervastu Posted November 9, 2011 Author Share Posted November 9, 2011 so if any one have an idea then please let me know Quote Link to comment https://forums.phpfreaks.com/topic/250796-mlm-display-binary-tree/#findComment-1286771 Share on other sites More sharing options...
ManiacDan Posted November 9, 2011 Share Posted November 9, 2011 This can easily be done with a pre-order recursive function, passing the multiplier back up from the children to be used when printing the parents. Google for pre-order recursion. Also, what demented professor uses MLM schemes as teaching material? I hope he told you that they're both evil and illegal. Quote Link to comment https://forums.phpfreaks.com/topic/250796-mlm-display-binary-tree/#findComment-1286783 Share on other sites More sharing options...
killervastu Posted November 9, 2011 Author Share Posted November 9, 2011 This can easily be done with a pre-order recursive function, passing the multiplier back up from the children to be used when printing the parents. Google for pre-order recursion. Also, what demented professor uses MLM schemes as teaching material? I hope he told you that they're both evil and illegal. Thanks but what to do according to them after completing this project i would have a small amount of good knowledge of php Quote Link to comment https://forums.phpfreaks.com/topic/250796-mlm-display-binary-tree/#findComment-1286787 Share on other sites More sharing options...
ManiacDan Posted November 9, 2011 Share Posted November 9, 2011 All you have is 4 database columns and zero knowledge of PHP? Ask your professor/TA for help. Yes, creating an object tree and implementing pre-order recursion (possibly followed by in-order recursion) would give you a good knowledge of PHP, that's why it was week 14 in my CompSci 101 course. You need a lot more base for this. Quote Link to comment https://forums.phpfreaks.com/topic/250796-mlm-display-binary-tree/#findComment-1286793 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.