I have two tables ( users and relationship ) and I want to show the followers (users that I follow, but they do not).
At the moment I only have to show me the users that I follow and they also show me.
Query (Users that follow):
select u.* from relationship r join relationship m on m.idUser = r.idFollower and m.idFollower = r.idUser join users u on u.id = r.idFollower where r.idUser = 1 and r.status=1
- id - name - lastName
- id - idUser - idFollower
Example: If I enter user 1, I would have to return user 5 and 8, because they do not follow me.