title: PDOException: Query was empty
body: <p>I have a PDO PHP file making use of just one $_POST value stored on the <code>$data</code> array, and if an statement is true, a second value is added to that array to make a new query with two values:</p>
  
  <pre><code>&lt;?php
      session_start();
      include("../conexionbbdd.php");    
  
      if($_SESSION['estado'] == 'activo' &amp;&amp; $_SESSION['rol'] == '1'){
  
      $data = array(
          'us_id'   =&gt; $_POST['us_id'],
      );
  
      $selectUsers= "SELECT * FROM ws_users WHERE us_id= :us_id";
      $statementSelectUsers = $pdo-&gt;prepare($selectUsers);
      $statementSelectUsers-&gt;execute($data);
      $result = $statementSelectUsers-&gt;fetch(PDO::FETCH_ASSOC);
      $us_fk_ui_id =  $result['us_fk_ui_id'];
  
      if($us_fk_ui_id==='1'){
  
          $data['us_credits']=$_POST['us_credits'];
  
          $updateUser = mysqli_query($con,"UPDATE ws_users SET us_credits = :us_credits, us_access = '1' WHERE us_id = :us_id");
          $statementUpdateUser = $pdo-&gt;prepare($updateUser);     
          $statementUpdateUser-&gt;execute($data); 
      }
  </code></pre>
  
  <p>Everything goes fine untill the <code>$statementUpdateUser-&gt;execute($data);</code>  line (34), where I get the usual error </p>
  
  <blockquote>
    <p>PDOException: SQLSTATE[42000]: Syntax error or access violation: 1065
    Query was empty in C:\wamp\www**********\actions\ad_updateUserInfo.php on
    line 34</p>
  </blockquote>
  
  <p>As far as I've seen, this should be due to the unexistance of one of the placeholders on the array, but if I print the array values after the <code>$data['us_credits']=$_POST['us_credits'];</code> it seems to be correct, having the 2 expected values needed for my query:</p>
  
  <blockquote>
    <p>Array (
        [0] => 2
        [1] => 1.5 )</p>
  </blockquote>
  
  <p>How could I check where the mistake is? There's no possibility of echoing the query as it is an object unable to transform on string.</p>