MySQL Forums
Forum List  »  PHP

how do i create a database for referral system
Posted by: Muhammad Saleem
Date: February 02, 2015 12:07AM

Hi!
I am student and learning MySQL now a days, I have created a CMS, everything is almost done, admin and user panel is ready but now I am facing some problem regarding table structure and need your help in this regard
Basically it’s a referral website user refer each other to get registration on website. All I have to display is referral structure in user panel.
Suppose A refer to B and B refer to C and C refer to D and so on. Like that A also refer G,H,I,J,K and C also refer X,Y,Z
I want to A’s user panel will display
Names of direct referral B,H,I,J,K
Names of 2nd direct referral C
Names of 3rd direct referral D,X,Y,Z

Please guide me which tables I have to create and also tell query to retrieve data from table.

I also have a table to store some basic info of user its stricter is this.
Id(primary key)
Username
Email
Password
Referral name (the person who refer you on this website)

Please help me it’s really important for me

Options: ReplyQuote


Subject
Written By
Posted
how do i create a database for referral system
February 02, 2015 12:07AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.