Welcome Guest, Not a member yet? Register   Sign In
Right Join Query Problem
#2

[eluser]solid9[/eluser]
This is not hard, this is a One to Many relationship tables.
You need to convert your DownLine table from this,
Code:
+----------+------------------+------+-----+---------+----------------+
| Field    | Type             | Null | Key | Default | Extra          |
+----------+------------------+------+-----+---------+----------------+
| down_id  | int(10) unsigned | NO   | PRI | NULL    | auto_increment |
| level    | int(10) unsigned | NO   |     | NULL    |                |
| fkmember | int(8) unsigned  | NO   | MUL | NULL    |                |
| downline | int(8) unsigned  | NO   |     | NULL    |                |
+----------+------------------+------+-----+---------+----------------+

to this table,
Code:
+----------+------------------+------+-----+---------+----------------+
| Field    | Type             | Null | Key | Default | Extra          |
+----------+------------------+------+-----+---------+----------------+
| down_id  | int(10) unsigned | NO   | PRI | NULL    | auto_increment |
| member_id| int(8) unsigned  | NO   | IDX | NULL    |                |                
| level    | int(10) unsigned | NO   |     | NULL    |                |
| downline | int(8) unsigned  | NO   |     | NULL    |                |
+----------+------------------+------+-----+---------+----------------+

Noticed the newly added member_id column.

I don't think you need the fkmember column?
All you need is the member_id from member table and copy that into DownLine table.

The rest are easy.





Messages In This Thread
Right Join Query Problem - by El Forum - 11-19-2012, 02:39 AM
Right Join Query Problem - by El Forum - 11-19-2012, 03:55 AM
Right Join Query Problem - by El Forum - 11-19-2012, 04:05 AM
Right Join Query Problem - by El Forum - 11-19-2012, 04:53 AM



Theme © iAndrew 2016 - Forum software by © MyBB