PHP: Idea for friend-system?
<p>I need help on making a friend-system.</p>

<p>I am thinking how to make so both users can see that they are friends together.</p>

<p>Should i just make a user1 field and user2 field, and then when displaying him/her´s friends, it should select where user1 ='$id' OR user2 = '$id'  ?</p>

<p>Or should i make two rows each time people are being friends?</p>

<p>Smart way and example would be appreciated. Thank you.</p>

<p>I am storing in mysql database.</p>

<p>My thoughts is exactly in how should i list that who is friend with who. Lets say i use method 1) with user1 and user2 column, then i should have  WHERE user1 or user2 is $id (users id) but can this work properly?</p>

<p>I just tried this and it shows the userid for user2 in user1´s friendslist,
 but in user2´s friendslist it just shows his own userid and not the user1s..</p>
