Jump to content

MLM-Display binary Tree


killervastu

Recommended Posts

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]

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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  :)

Link to comment
Share on other sites

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.

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.