title: Selecting forum posts that have posts by two specific users - is there a better way?
body: <p>I'm working on a personal project and want to gather all posts from a forum that contain comments from both users in a pair (in this case, those with IDs 7816 and 7424). I've accomplished this with the query below, but it's hamfisted and I'm convinced there's got to be a better way.</p>
  <p>In plain English, the idea is to gather all the unique topic_id's that contain posts by 7816, then gather all the unique topic_id's that contain posts by 7424 WHERE the topic_id is somewhere in the set generated for 7816, then select * on that.</p>
  <pre><code>SELECT * FROM forums_posts WHERE topic_id IN (
      SELECT distinct topic_id
          FROM forums_posts WHERE topic_id IN (
              SELECT DISTINCT topic_id
                  FROM forums_posts
                  GROUP BY topic_id, author_id
                  HAVING author_id = 7816
              )
          GROUP BY topic_id, author_id
          HAVING author_id = 7424
  ) ORDER BY topic_id, post_date;
  </code></pre>
  <p>I'm sure I could drop the complexity down considerably with some tricks I haven't learned yet. Is there an accepted way of performing operations like this?</p>
  <p>Thanks!</p>