I am taking over someone elses project and need to work out a php mysql query to figure out mutual friends from a friends table.
the table looks like the below - my id for example would be 1, the profile I am looking at has an id of 5
the output of the mutual friends id would be 3
rel 1 | rel 2
--------------
1 | 5
5 | 1
3 | 5
5 | 3
1 | 3
3 | 1
The id's look like they have gone in twice (both ways)
cant get my head round the query needed