Fix notice when deleting last record

When deleting the last record for a given foreign key, the $results (sum in my example) would be completely empty as there were no records to sum.