title: Get sum of MySQL column in PHP
body: <p>I have a column in a table that I would like to add up and return the sum. I have a loop, but it's not working.</p>
  
  <pre><code>while ($row = mysql_fetch_assoc($result)){
      $sum += $row['Value'];
  }
  
  echo $sum;
  </code></pre>