I want to create a friends system like facebook, well quite weird than that. When a user adds someone, the someone will be notified, if agree then they'll be mutual friends(in this case, meaning both parties are friends, literally) or if the someone leaves the request unresponded, they'll become fan of the someone. The someone reject the request, they'll no longer fan nor friend.
How can do this in PHP with MYSQL. Here is my initial planning, somehow im not sure it'll be the best way to do it.
MYSQL TABLE
user_id (request made by) | friend_id (request point towards) | status
--------------------------------
123 | 452 | 'waiting'
525 | 123 | 'waiting'
Meaning user 123 have 1 friend request from 525, and made 1 friend request to 452. The problem here is how Im going to get the friend list of user 123? if user 123 accept 525's request and user 452 accept 123's request. And also how to get the fans list by MYSQL QUERY..and how to get friends of friend?