title: MySql get rows where one column equals to another colum in another table where one column is equal
body: <p>I have two tables:</p>
  
  <p>tbl_post and tbl_public</p>
  
  <p>tbl_post:</p>
  
  <pre><code>id | post_id   |  author  |  date (unix time)
  --------------------------------
   0 |  123456   | User 1   |  1489857236
   1 |  123457   | User 2   |  1489857237
   2 |  123458   | User 3   |  1489857238
  </code></pre>
  
  <p>tbl_public:</p>
  
  <pre><code>    id | post_id | public | date (unix time)
      -----------------------------------------
   --&gt; 0 |  123456 |  0     |  1489857236
       1 |  123457 |  1     |
       2 |  123458 |  0     |
   --&gt; 3 |  123456 |  1     |  1489857239
  </code></pre>
  
  <p>i want to get all rows where user = "User 1" and the newest (order by date) public column in the table tbl_public is greater than 0 order by date DESC</p>
  
  <p>Can you please help me with the query command? :)</p>