title: Set SQL SUM() query to a PHP variable, and echo result
body: <p>I am trying to pull in the sum of all values in a database column, assign it to a PHP variable and display the value.</p>
  
  <pre><code>$total_drop_query = mysqli_query("SELECT SUM(total_drops) FROM pi_data");
  
  $row = mysqli_fetch_assoc($total_drop_query);
  
  $total_drops = $row['total_drops'];
  
  echo $total_drops;
  </code></pre>
  
  <p>This code isn't displaying any results, and it's driving me crazy!</p>
  
  <p>Thanks in advance.</p>