title: Weird mysql, showing 0 result set from myAdmin, but returns rows in PHP PDO
body: <p>I have this query which I run in phpMyAdmin</p>
  
  <pre><code>SELECT m.msgFrom, m.msgTo, m.msgID, m.subject, m.dateTime, a.username
  FROM mailbox m
  JOIN accounts a ON ( a.id = IF( m.msgTo =1, m.msgFrom, m.msgTo ) ) 
  WHERE msgTo =1
  OR msgFrom =1
  AND parentID =0
  AND IF( m.msgTo =1, m.fromDelete, m.toDelete ) !=1
  ORDER BY DATETIME DESC 
  LIMIT 250
  </code></pre>
  
  <p>And I get a rowset of 0.</p>
  
  <p>When using it with PDO PHP and placeholders like so,</p>
  
  <pre><code>$q = $dbc -&gt; prepare("
  SELECT m.msgFrom, m.msgTo, m.msgID, m.subject, m.dateTime, a.username 
  FROM mailbox m JOIN accounts a ON (a.id = IF(m.msgTo = ?, m.msgFrom, m.msgTo)) 
  WHERE msgTo = ? OR msgFrom = ? AND parentID = 0 AND IF(m.msgTo = ?, m.fromDelete, m.toDelete) != 1 
  ORDER BY dateTime DESC LIMIT 250");
  $q -&gt; execute(array($user['id'], $user['id'], $user['id'], $user['id']));
  </code></pre>
  
  <p>I get a rowset of 1 where <code>$user[id'] == 1</code>. </p>
  
  <p>What is going on here, and how can I fix it?</p>