I have table
answers(aid,user_id,...) - posts table
users (userid,name,...)
- followers(user_one,user_two) - where user_one is the follower and user_two is the followed by person.
I need to show posts from people I follow and my posts using php and mysql in my home feed.But currently it is not working as expected.Each posts is showing 7 times.
curent select query
<?php
$my_id = $_SESSION['user_id'];
$sql_query = "SELECT * FROM answers left join users on users.userid = answers.user_id LEFT join followers on followers.user_one = answers.user_id WHERE answers.user_id= '$my_id' ORDER BY answers.date_created DESC";
?>