title: PDO query is always returning 1 or true
body: <p>I am trying to check if a row exists before I delete it. The row in my table doesn't exist but it always returns <code>1</code>:</p>
  
  <pre><code>$orders = $this-&gt;db-&gt;prepare("SELECT * FROM orders WHERE id=? AND user=?"); 
              $check = $orders-&gt;execute(array($message,$this-&gt;model-&gt;checkapi($data,$message)));
              echo $check;
              if($check){
              $deleteorder = $this-&gt;db-&gt;prepare("DELETE FROM orders WHERE id=? AND user=?"); 
              $deleteorder-&gt;execute(array($message,$this-&gt;model-&gt;checkapi($data,$message)));
                  array_push($result, array('success' =&gt; true,
                                            'deleted' =&gt; $message));
                  echo json_encode(array("result" =&gt; $result));
                  die();
              }else{
  </code></pre>
  
  <p><code>$this-&gt;model-&gt;checkapi($data,$message)</code> 
  returns fakeusername and id/$message returns 136</p>
  
  <p>I've checked my database, the ID exists, but not the id and username together.</p>
  
  <p>I'm sending id: 136 and username: fakeuser</p>
  
  <p>in the databse the row exists as id:136 and username: demo.</p>
  
  <p>I'm not sure why it's returning 1 when the row shouldn't be selected due to it not matching.</p>
  
  <p><img src="https://i.stack.imgur.com/A3Q0i.png" alt="enter image description here"></p>