title: adding a passed in number to a MySQL cell with PHP
body: <p>I am trying to add a number to a number already in a MySQL table. I am using POST to pass in the number.</p>
  
  <pre><code>    &lt;?php
      require "connection.php";
  
      $id = $_POST["id"];
      $number = $_POST["number"];
  </code></pre>
  
  <p>Do I have to make 2 separate queries, one to retrieve the current value and set is as a variable and one to insert the new value by adding the number to the variable or can I accomplish this with one query with something like this:</p>
  
  <pre><code>    $update_query = "update Table set value = (value + $number) where id like '$id';" 
  </code></pre>