I have a article pages, that i only want to show feed of the users that every account is following, kinda like twitter.
I have to distinct tables one is called posts other is called followers
I want to loop the articles but i want it to select only the users that my account is following.
I just need the SQL query that can do that since the PHP part of the rest i can perform it
Something like this , although i know that this one does not work
$connect->query("SELECT id,userid,postagem FROM posts WHERE IN (SELECT followed FROM followers WHERE whofollowed = '$userd' ) ORDER BY id DESC LIMIT 13");