I want to present all the posts ,of the pages, which the user follow. I have table "followings" with the fields "user_id" and "page_id"( for example user_id=100, and page_id=120, & user_id=100 and page_id=130...)
This is how I print all the pages that the user follow
$que_following=mysql_query("select * from followings where user_id='$user_id'");
while ($row = mysql_fetch_assoc($que_following))
{
echo $row['page_id'];
}
And this is how I get all the posts, from "user_post"
$posts=mysql_query("select * from posts order by post_id desc");
Now I want to get all the posts from the pages that the user follow, I thought of something like that:
$posts=mysql_query("select * from posts where page_id=120 OR page_id=130 OR...... order by post_id desc");
But how can I do that?