I have a basic follower/following table in mySQL which looks like this.
id user_id follower_id
1 userA userB
2 userC userA
3 userA userC
4 userB userC
5 userB userA
I checked these topics but couldnt find what I need
database design for 'followers' and 'followings'?
What I need is to have a system like this:
Assume we are userB ( we follow userA, we are followed by userC and userA)
I like to return a result that includes this follower/following state. For example for userB:
id followedBy areWeFollowing
1 userA 1
2 userC 0
Thanks for your help!
arda