Query using a sum

I agree with @oddz, the problem here is that you’re not telling us what you mean by “doesn’t work”. The only thing I can think of is that you’re maybe accessing the results as an associative array and having trouble with the column name. Try

$financial = $SQL->query("select sum(gross_price) as sumprice from donations where id = '$id'");
$money = $SQL->fetch_array($financial);
echo $money['sumprice'];

If that doesn’t help, give us more information exactly how things don’t work, error messages, etc.