| View previous topic :: View next topic |
| Author |
Message |
plantino Enthusiastic Coder
Joined: 13 May 2006 Posts: 96
| |
optomeb Enthusiastic Coder
Joined: 19 May 2006 Posts: 113
|
Well i figured out how to do a sql query that searches the user database and displays the refferal #, i just have to figure out how to translate that to the right username
Reply with quote
|
| |
|
|
plantino Enthusiastic Coder
Joined: 13 May 2006 Posts: 96
| |
optomeb Enthusiastic Coder
Joined: 19 May 2006 Posts: 113
| |
plantino Enthusiastic Coder
Joined: 13 May 2006 Posts: 96
|
Do you have a relationship between the referral number and the username?
Reply with quote
|
| |
|
|
optomeb Enthusiastic Coder
Joined: 19 May 2006 Posts: 113
| |
plantino Enthusiastic Coder
Joined: 13 May 2006 Posts: 96
|
Then you just need to use a JOIN statement to join the referral number in one table to the username in another.
Reply with quote
|
| |
|
|
optomeb Enthusiastic Coder
Joined: 19 May 2006 Posts: 113
|
For example, I (user 1) reffer john (who is user 4). john will have a value in his database called $ref where the value is 1
Reply with quote
|
| |
|
|
plantino Enthusiastic Coder
Joined: 13 May 2006 Posts: 96
| |
optomeb Enthusiastic Coder
Joined: 19 May 2006 Posts: 113
|
But i dont have a value that says i reffered john
plantino, the problem is how can i join it if its all in the same database ?
Same table i mean
:)
Reply with quote
|
| |
|
|
|