title: PHP 5.4.16, pdo_mysql 5.6.31, MySQL community server 5.7.17-log - Integers always quoted
body: <p>I went through all of the questions regarding MySQL and the PDO driver enclosing integer values in single quotes. Some of the questions related specifically to the <a href="http://php.net/manual/en/pdo.quote.php" rel="nofollow noreferrer">PDO::quote</a> function. The other ones in regard to the <a href="http://php.net/manual/en/pdostatement.execute.php" rel="nofollow noreferrer">PDOStatement::execute</a> quoting integers were answered either by suggesting turning off emulation mode or specifying <code>PDO::PARAM_INT</code> for the bound parameter. In my case neither of those result in the desired behavior i.e. unquoting the integers.</p>
  
  <pre><code>$query = 'UPDATE `table` SET `cX`=:cX WHERE `id`=:id';
  $db-&gt;prepare($query);
  $db-&gt;bindParam(":cX", 700, PDO::PARAM_INT);
  $db-&gt;bindParam(":id", 1, PDO::PARAM_INT);
  $db-&gt;execute();
  </code></pre>
  
  <p>Looking at the mysql general log this results in:</p>
  
  <pre><code>command_type: Query | argument: UPDATE `table` SET `cX`='700' WHERE `id`='1'
  </code></pre>
  
  <p>Turning off emulation mode has absolutely no effect on the end result either - it only affects the intermediate steps and PHP to MySQL communication mechanism.</p>
  
  <pre><code>$db-&gt;setAttribute(PDO::ATTR_EMULATE_PREPARES, false);
  $query = 'UPDATE `table` SET `cX`=:cX WHERE `id`=:id';
  $db-&gt;prepare($query);
  $db-&gt;bindParam(":cX", 700, PDO::PARAM_INT);
  $db-&gt;bindParam(":id", 1, PDO::PARAM_INT);
  $db-&gt;execute();
  </code></pre>
  
  <p>This time the MySQL general log reads:</p>
  
  <pre><code>command_type: Prepare | argument: UPDATE `table` SET `cX`=? WHERE `id`=?
  command_type: Close stmt
  command_type: Execute | argument: UPDATE `table` SET `cX`='700' WHERE `id`='1'
  </code></pre>
  
  <p>So no matter what setup I use the integers always get enclosed in quotes. So my question is: Is there any way to get around this or is it already a standard and something that should be accepted as normal behavior?</p>