Get user Posts and/or Comments in a sharing blog using SQL
问题 This (My)SQL problem will make me crazy if not solved this week-end! A simple shared blog (means many authors contribute). Let's consider that two tables on my database: Posts : id author_id title content Comments : id author_id post_id content Goal: I want to display all the activities of a contributor (=> fixed author_id) . What I mean by activity is: If the user created the post and commented: Display the post title and the user comment If the user created the post but doesn't comment: