I have spent hours and still couldn't able to do it correctly. I have user table, and posts table.
User table
username | followers | following
john | mary,steven,joel | anthony,matthew
Posts table
fromuser | post | date
mary | Bla bla, today is cold. | 1475982647
I need to get posts from the users who are being followed. Tried this;
SELECT * FROM posts WHERE $member[nick]
IN (SELECT followers FROM users WHERE $member[nick] IN followers ORDER BY id DESC limit 10
This doesn't return any posts. What is the correct way to do it ?