title: How to echo the post's content
body: <p>I have two tables like this:</p>
  
  <p><em>posts</em> table:</p>
  
  <pre><code>post_id    subject    
     1         abc
     2         def
  </code></pre>
  
  <p>and <em>contents</em> table, of which the <code>post_id</code> column is the foreign key:</p>
  
  <pre><code>content_id    post_id     content              date
       1           1        main content       2014-07-31 03:02:00
       2           1        reply one          2014-07-31 03:03:20
       3           1        reply two          2014-07-31 03:06:32
  </code></pre>
  
  <p>As you can see, the <em>contents</em> table stores both the post's content and its possible repli(es). Here, in this example, the <code>post_id</code> # 1 has its main content and two replies.</p>
  
  <p>What I want to do is to <strong>echo</strong> the subject and its content only, <strong>but not the replies</strong>. So I have coded the query like this:</p>
  
  <pre><code>$query = "SELECT subject, content
            FROM posts As p
            INNER JOIN contents AS c USING (post_id)
            ORDER BY post_id DESC";
  $result = mysqli_query ($dbc, $query)
  
  while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
      echo "{$row['content']}n\";
  }
  </code></pre>
  
  <p>Then you know what?. It echoes out the latest content of the post, which is the <code>content_id</code> # 3. However, what I wanted to do is to echo the post's content, which is the oldest <code>content_id</code> of the <code>post_id</code> # 1.</p>
  
  <p>Can you help me, please?</p>