Hi,
I have a table:
id user1 user2
and I am looking for a way to select all the users that are connected to each other, for example:
id user1 user2
1 john bob
2 bob tracy
3 tracy greg
4 fred hanna
5 greg james
I want to see if john is connected to james, so the result should return:
id user1 user2
2 bob tracy
3 tracy greg
5 greg james
is something like this possible ?
I have a table:
id user1 user2
and I am looking for a way to select all the users that are connected to each other, for example:
id user1 user2
1 john bob
2 bob tracy
3 tracy greg
4 fred hanna
5 greg james
I want to see if john is connected to james, so the result should return:
id user1 user2
2 bob tracy
3 tracy greg
5 greg james
is something like this possible ?