i have these tables in database
Users table
UserId | Username | password
Users Posts Table
PostId | PostsTitle | PostUser (The id of the User who post this )
Following Table
FollowId | Following | Follower
Now what is the best way to get the people i follow posts order by id in desc way
like twitter do
i came up with this MySql code i don't know if it's the best way to do this or there is another way to
SELECT * FROM posts 
WHERE PostUser in (
    SELECT follower 
    from Following 
    where Following=$loggedin_user);
i found this answer in here (Here)
 
     
    