If I have three tables:
posts
------
postid date_posted title content
views
------
viewid post_id user_id
users
------
userid username
-
What is the correct way of listing all
poststhat have not been viewed byuser_id? Is this query correct?
SELECT * FROM posts LEFT JOIN views ON postid=post_id WHERE user_id=123 AND postid=NULL; -
How about listing all
postsand their “view status” byuser_id? -
Can you also recommend a great (user-friendly, non-geeky) resource to improve my understanding of LEFT JOIN, CROSS JOIN, and (normal joins? select * from posts, views)?
Thank you!
1.
OR