title: pgsql 42601 error with PDO::execute
body: <p>I have problems with $pdo->execute($values).</p>
  
  <p>It works fine if I use <code>$pdo-&gt;execute()</code> without $values:</p>
  
  <pre><code>$dsn = sprintf('%s:host=%s;port=%s;dbname=%s', DB_TYPE, DB_HOST, DB_PORT, DB_NAME);
  $pdo = new PDO($dsn, DB_USER, DB_PASS, array());
  $pdo-&gt;setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
  
  $sql = 'SELECT * FROM "user" ORDER BY id DESC LIMIT 50 OFFSET 0';
  $stmt = $pdo-&gt;prepare(trim($sql));
  $stmt-&gt;setFetchMode(PDO::FETCH_OBJ|PDO::FETCH_PROPS_LATE);
  $stmt-&gt;execute();
  
  echo "&lt;pre&gt;";
  print_r($stmt-&gt;fetchAll());
  echo "&lt;/pre&gt;";
  </code></pre>
  
  <p>It works fine, but when I want to add values replacement:</p>
  
  <pre><code>$dsn = sprintf('%s:host=%s;port=%s;dbname=%s', DB_TYPE, DB_HOST, DB_PORT, DB_NAME);
  $pdo = new PDO($dsn, DB_USER, DB_PASS, array());
  $pdo-&gt;setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
  
  $sql = 'SELECT * FROM "user" ORDER BY ? ? LIMIT 50 OFFSET 0';
  $values = array('id','DESC');
  
  $stmt = $pdo-&gt;prepare(trim($sql));
  $stmt-&gt;setFetchMode(PDO::FETCH_OBJ|PDO::FETCH_PROPS_LATE);
  $stmt-&gt;execute($values);
  
  echo "&lt;pre&gt;";
  print_r($stmt-&gt;fetchAll());
  echo "&lt;/pre&gt;";
  </code></pre>
  
  <p>It doesn't work. It returns:</p>
  
  <blockquote>
    <p>SQLSTATE[42601]: Syntax error: 7 ERROR: syntax error at or near "$2"
    LINE 1: SELECT * FROM "user" ORDER BY $1 $2 LIMIT 50 OFFSET 0 ^' in
    ...</p>
  </blockquote>