I have three tables. Sales, Leads, and one that ties them together.
sales tbl has (id, name) for fields
leads tbl has (id, name) for fields
tie tbl has (id, subID)
Lets say the sales table contains the following data
Lets say the leads table contains
The tie table then contains
–Jenny (indirect level 1)
—George (indirect level 2)
–Frank (indirect level 1)
–Curtis (indirect level 1)
Any ideas on how I would query based on a sales person, the direct and indirect leads under them? My goal would be to go unlimited levels. I nested while loops, and came up with a patched version of this, but it is too much hassle to work with. Anyone ever done anything like this before?