Modified SQL query for displaying a user's posts in their profile