MySQL Forums
Forum List  »  InnoDB

Sophisticated SELECT statement, help me do the math!
Posted by: homiee horsy
Date: February 20, 2008 07:54AM

heya all,

I have this table:

OwneruserID | FriendUserId
1 | 2
2 | 1
2 | 3
3 | 2
3 | 4
4 | 2

This table means: User 1 is friend with User 2, User2 is friend with User3 and User3 is friend with User4

I'm looking for a select statement to select the friends of friends of my friends (but only select those who are not my friends or friends of my friends)

Help me out.. I've been trying to solve this for days
Thanks in advance!
homiee

Options: ReplyQuote


Subject
Views
Written By
Posted
Sophisticated SELECT statement, help me do the math!
3449
February 20, 2008 07:54AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.