I'm creating a website in which a registered user can see a post only once.i have used a DB table (viewed posts) in which i save user id of the logged in user and post id of the post he viewed . i want to show only those posts to user which he has not seen yet from the (post) table. please help me how i can do this . i have tried left joint etc but none of them works well
i also tried this one but it not works
select * from post, viewed_post
where post.p_id !=viewed_post.p_id
AND viewed_post.u_id!='$logged_in_user_id';