title: How to increase database field value by 1 at refresh in PDO?
body: <p>I search for this question but no one was able to solve my problem. This is my query for to increase database fied value. When I refresh page for first time then it automatically add 2 in one refresh but when I refresh second time then it doesn't update database value.</p>
  
  <pre><code>$stmt = $con-&gt;prepare("UPDATE mobile set view2=:view2+'1' WHERE id=:id");
  $stmt-&gt;execute(array(':view2'=&gt;$view2+1,':id'=&gt;$id));
  </code></pre>
  
  <p>Help me. I'm new in PDO.</p>