title: join tables to display posts of people who I follow
body: <p>I want to display the posts of people who I follow</p>
  
  <p>The 3 tables I have are:</p>
  
  <p>Users:</p>
  
  <pre><code>+---------+------+
  | id_user | name | last_logout
  +---------+------+
  |       1 | A    | 22-02-2018 00:00:10
  |       2 | B    |
  |       3 | C    |
  |       4 | D    |
  |       5 | E    |
  +---------+------+
  </code></pre>
  
  <p>Community:</p>
  
  <pre><code>+-------------+-------------+
  | id_follower | id_followed |
  +-------------+-------------+
  |           1 |           2 |
  |           1 |           3 |
  |           1 |           5 |
  +-------------+-------------+
  </code></pre>
  
  <p>Posts:</p>
  
  <pre><code>+---------+--------------+---------------+
  | id_post | id_user_post |     post      |  date
  +---------+--------------+---------------+
  |       1 |            2 | hi            |
  |       2 |            3 | hello         |
  |       3 |            5 | hey you       | 
  |       4 |            4 | come on       |
  |       5 |            5 | where are you | 22-02-2018 00:01:00
  +---------+--------------+---------------+
  </code></pre>
  
  <p>I'm using the following code but it doesn't return anything </p>
  
  <pre><code>SELECT u.name AS n
      ,p.post AS t
  FROM community AS c
  LEFT JOIN users AS u ON u.id_user = c.id_followed
  LEFT JOIN posts AS p ON c.id_followed = p.id_user_post
  WHERE u.id_follower = 1
  </code></pre>