I have UserComments table like this :
1 | Frank | hello world
2 | Jane | Hi there
3 | Frank | this is my comments
4 | Frank | I think I need some sleep
5 | Jason | I need to buy new MacBook
6 | Jane | Please invite my new Blackberry PIN
On the other hand, I have FriendList table contains :
1 | Jason
2 | Jane
Let’s say my friends ID always BETWEEN 1 AND 5.
And since Frank is not my friend, I’m not able to see his comments. how to have combined tables like this (ORDER BY UserComments.ID DESC) :
1 | Jane | Please invite my new Blackberry PIN
2 | Jason | I need to buy new MacBook
3 | Jane | Hi there
thanks.
Try this: