title: PDO query binding string instead of integer returns results
body: <p>I have a table with and auto increment id and was just testing a few scenarios when I stumbled across a problem whereby PDO or mysql seems to convert a string to an integer when in an array.  Does anyone know why?</p>
  
  <p>If my query is as follows:</p>
  
  <pre><code>$check = $db-&gt;prepare("SELECT * FROM tbl_test WHERE id=:id");
  $check-&gt;execute(array(':id'=&gt;1));
  </code></pre>
  
  <p>it retrieves 1 record - all fine, but if the query uses a string either by design or mistake as follows:</p>
  
  <pre><code>$check = $db-&gt;prepare("SELECT * FROM tbl_test WHERE id=:id");
  $check-&gt;execute(array(':id'=&gt;'1 OR id &gt; 0'));
  </code></pre>
  
  <p>it still retrieves a record with id=1.</p>
  
  <p>Surely nothing should be found?  I appreciate I should never allow the 2nd scenario to happen but why is PDO / mysql converting the string to an integer and how is it doing it?</p>