How to model Friendship relationships
I have been trying to figure out how to do this, and even with looking at other examples, I can't get it figured out, so maybe I can get some personalized help. I've got two tables, users_status and friendships . In the users_status table I have a field userid , and several others. In the friendships table, I have the fields request_to , request_from , and friendship_status . Basically what I want to do is get all of the status posts by the current user AND those who are friends of the current user (which I can specify in my PHP using a $userid variable). Here's an example of the friendships