title: How can I return true when the condition of where clause is false?
body: <p>I have two tables like this:</p>
  
  <pre><code>// Posts
  +----+---------+-----------------+----------+
  | id |  title  |    content      |  amount  |
  +----+---------+-----------------+----------+
  | 1  | title1  | content1        | NULL     |
  | 2  | title2  | content2        | 1000     |
  | 3  | title3  | content3        | 5000     |
  | 4  | title4  | content4        | NULL     |
  | 5  | title5  | content5        | 2000     |
  +----+---------+-----------------+----------+
  //                                 ^ NULL means that question is free
  
  
  // Money_Paid
  +----+---------+---------+
  | id | user_id | post_id |
  +----+---------+---------+
  | 1  | 123     | 2       |
  | 2  | 345     | 5       |
  | 3  | 123     | 5       |
  +----+---------+---------+
  </code></pre>
  
  <p><strong>All I'm trying to do:</strong> Some of my posts aren't free and anybody wants to see them should pay their cost. Now I need a query to check current user paid the cost of that post or not? <em>(just for non-free post)</em></p>
  
  <pre><code>select *, 
       (select count(1) from Money_paid mp where p.amount is not null and mp.post_id = p.id and mp.user_id = :user_id) paid
  from Posts p 
  where p.id = :post_id
  </code></pre>
  
  <hr>
  
  <p>Here is a few <strong>examples</strong>: <em>(based on current tables)</em></p>
  
  <pre><code>$stm-&gt;bindValue(":post_id", 2, PDO::PARAM_INT);
  $stm-&gt;bindValue(":user_id", 123, PDO::PARAM_INT);
  // paid column =&gt; 1 (the user of '123' can see this post because he paid post's cost)
  
  $stm-&gt;bindValue(":post_id", 2, PDO::PARAM_INT);
  $stm-&gt;bindValue(":user_id", 345, PDO::PARAM_INT);
  // paid column =&gt; 0 (the user of '345' cannot see this post because he didn't pay post's cost)
  
  $stm-&gt;bindValue(":post_id", 5, PDO::PARAM_INT);
  $stm-&gt;bindValue(":user_id", 345, PDO::PARAM_INT);
  // paid column =&gt; 1
  </code></pre>
  
  <hr>
  
  <p><strong>What's my problem?</strong> The output of my query is <code>0</code> when the post is free. <em>(While I need <code>1</code> when post is free)</em>.</p>
  
  <p>Again. I need <code>1</code> for both free posts and paid users, And <code>0</code> for unpaid users. To easy handle it by PHP like this</p>
  
  <pre><code>if ($result['paid'] == 1) {
      // show it
  } elas {
     // doesn't show it
  }
  </code></pre>
  
  <p>How can I fix it?</p>