I am trying to get the sum of an array of numbers I have collected. I have used this array in in another query, so I know that works correctly. But I may be using it wrong in this instance for a sum? Appreciate any help.
$result = mysqli_query("SELECT SUM(price) AS price_sum FROM products where prodID IN (".implode(',',$arrayID).")");
$row = mysqli_fetch_assoc($result);
$sum = $row['value_sum'];
echo $sum;
?>