title: Parameterized update SQL query using PHP
body: <p>I have a table where two entries has <code>id = 10</code>. My SQL update query looks like this:</p>
  
  <pre><code>$q = "UPDATE `table_name` SET `col_name` = 'value' WHERE `id` = ?";
  if($con-prepare($q)){
      $stmt-&gt;bind_param("i","10");
      $stmt-&gt;execute;
      $stmt-&gt;fetch;
      $stmt-&gt;close();
  }
  </code></pre>
  
  <p>The query will not run, where is the error in it? And also, when it does run, will it update ALL entries where <code>id = 10</code> or just the first one?</p>