I know how to get mutal friends in 1 query, but now the hard part comes, how can I get all the friends of my friends who are not my friends in 1 query, which returns user IDs? I looked at some of the posts here regarding this, but I could not get them to work the way I wanted.
My relationship is two ways, so if 1 and 2 are friends, there are two rows in the relationship table.
my tables with relevant information:
table_users
user_id
table_relations
rel_id
from_id
to_id
I have been struggling with this for 2 days, and I cannot get it to work.
Sincerely, Alexander
source
share