Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialmasterpowers
3,061 PointsAnyone here can Point me A Good Place to Start if im Up to Building Multi-level Marketing Script?
I already started building the the Script i already have the Registration Done Using Laravel. IVe done 2 payplan My Only Problem Now is Im Having Hard time With the Matrix Part. This is a 2x5 matrix. My Database Model is like this
Matrixs Table linkID SponsorLinkID ParentID ChildLeftID ChildRightID.
Dont Know if i Will Add Depth Column Here Since my ChildLeft and ChildRightID is my Max Width of 2
Since you can only have 2 on your first level (ChildLeftID) and (ChildRightID) that is how i come up with that model. For the Tree View I Come up with this Positioning 1 = (1,1) 2 =(1,2) 3=(2,1) 4=(2,2) 5 =(3,1) 6 =(3,2) up to 62= ( 31,2) .
My Dilemna is this I want a LinkID to Be a Root For All The Users Owner. Then Those Position will be applied on to them depending on the ParentID and if the Position is Available.
Since A Link Can Only Refer on First level up to 2 , if the position for 1 and 2 is filled up I want it to go to 3 or 4 whichever is the first available.
Ive already Built the Relationship of a Child and Parent in my Model.
I Just Need Any Reference Books or Help that can Point me to Finished this Project. If anyone has experience building this type of Script , Please point me to the right Direction thanks.
1 Answer
Ted Sumner
Courses Plus Student 17,967 PointsI am not sure where you are having problems, but look at the database fundamentals course and the php course that adds a database to the Shirts for Mike project. They give good fundamentals.