Okay....
I already know the user_id. What I need is to get rows where they are all related to leader_id based off 'user_id'
So i have
5 20
8 20
2 999
94 20
The user that is logged in has the id of 5.
I want to get other users that share the same leader_id
Is there a way to get this information without knowing that leader_id is 20?
instead of doing:
select leader_id from table where user_id = 5
then
select user_id from table where leader_id = $leader_id
-
I already know Select * from table WHERE leader_id = 20