title: SQL Bound variables error
body: <p>I'm getting the error in my code. I'm sure this means there is something wrong with the column=:variable section of my code, but I've gone over it and can't see what's wrong. </p>
  
  <pre><code>Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens' in F:\...
  </code></pre>
  
  <p>Here is the code (long first line):</p>
  
  <pre><code>        $stmt = $dbh-&gt;prepare("UPDATE item_list SET quantity=:quantity, new_price=:newprice, image_link=:image_link, market_hash_name=:markethashname, last_update='1000-01-01 00:00:00', is_tradable='TEST', old_price=:oldprice WHERE item_name=:itemname AND (image_link IS NULL OR quantity IS NULL OR new_price IS NULL OR market_hash_name IS NULL OR last_update IS NULL OR is_tradable IS NULL OR old_price IS NULL)");
          $sql-&gt;bindParam(':quantity', $json2-&gt;quantity);
          $sql-&gt;bindParam(':newprice', $json2-&gt;lowest_price);
          $sql-&gt;bindParam('image_link', $image_link_full);
          $sql-&gt;bindParam(':markethashname', urlencode($mydata-&gt;market_hash_name));
          $sql-&gt;bindParam(':oldprice', $json2-&gt;lowest_price);
          $stmt-&gt;bindValue(':itemname', $mydata-&gt;market_name);
          $stmt-&gt;execute();
  </code></pre>
  
  <p>EDIT: image_link needed to be :image_link, still getting the same error</p>
  
  <p>EDIT 2: Had a lot wrong, was using two names $sql and $stmt, using bindValue instead of bindParam</p>