Posted 13 December 2012 - 16:57
I am not sure if this is the best solution but your table friends could have fields like this:
So if you send an invitation to a friend, you know how to set IDs. If some one send you a request, then he will put his id as me_id....And when you are doing a SELECT to get you friends you can do sth like this:
SELECT * FROM friends WHERE me_id = x
SELECT * FROM friends WHERE friend_id = x
where x is your id
Then put return valuse to one table.