I have an ee entries loop returning a bunch of entries. Each entry has a custom field holding a numerical value. I would like to add together the values of that field at the end and output the total.
PHP equivalent would be:
for ($i = 0; $i < $total; $i++){
$total += $value[$i];
}
Total = echo $total
Even better would be to just have this run a SQL like command and return the value for me:
SELECT SUM(column) FROM table
Are there any plugins that can help me with this? I'd like to avoid PHP if possible but if I have to how would I make the PHP work with EE tags, I can't seem to get the value for the custom field into my PHP.
Is there an operator for Stash to achieve this?