I want something like how facebooks wall works but when i call what others have posted its out of order with time
for example:
First Table (Users):
UserID: 1, Name: Matt,
UserID: 2, Name: Bob,
UserID: 3, Name: Steve,
Second Table (Friends):
UserID: 1, FriendUserId: 2
UserID: 1, FriendUserId: 3,
Third Table (Post):
PostId: 1, UserId: 2, Time: 1:00,
PostId: 2, UserId: 3, Time: 2:00,
PostId: 3, UserId: 2, Time: 3:00,
PostId: 4, UserId: 3, Time: 4:00,
I want it to echo out in order of time but it echos out as all posts from one person first in order of time then goes on to the next user as shown:
It echos like this:
Post 1
Post 3
Post 2
Post 4
But i want:
Post 1
Post 2
Post 3
Post 4
any ideas on how to to this?
thanks