problem in mysqlquery
i have 3 tables................
user, friends, posts and two users, user1 and user2.....

user1 has about 3-9 posts...!!<br>user 2 has about 5-9 posts...!!<br> when user1 add user2 as friend than user1 can see the posts of user2 just like facebook...!! but the posts only after the date when user1 add user2 as friend.....!! my query is like this<br>

$sql = mysql_query("SELECT * FROM posts p JOIN friends f ON p.userid = f.friendid AND s.time >= f.friend_since WHERE f.myid='user1id'");

then it gives me all the posts about user2 after the date since added as friend...!!
but problem is that it hides user1 posts and shows only user2 posts after added date.....

how can i fix it i.e 

user1 should see all of its own posts and all the posts of user2, that user2 has posts after the date he was added as friend



problem in mysqlquery
===

i have 3 tables................
user, friends, posts and two users, user1 and user2.....

user1 has about 3-9 posts...!!<br>user 2 has about 5-9 posts...!!<br> when user1 add user2 as friend than user1 can see the posts of user2 just like facebook...!! but the posts only after the date when user1 add user2 as friend.....!! my query is like this<br>

$sql = mysql_query("SELECT * FROM posts p JOIN friends f ON p.userid = f.friendid AND s.time >= f.friend_since WHERE f.myid='user1id'");

then it gives me all the posts about user2 after the date since added as friend...!!
but problem is that it hides user1 posts and shows only user2 posts after added date.....

how can i fix it i.e 

user1 should see all of its own posts and all the posts of user2, that user2 has posts after the date he was added as friend


