Forums

how tu sum?

admin_wiky 20 Aug, 2014
Hi all,
I cant find any topic about summanization of values?
why doesnt work php echo like echo $form-data[model][column]?
Have I use rather Chronoforms or which way I can handle with data?
thx
GreyHead 20 Aug, 2014
HI Homeopat,

I think that this is a ChronoConnectivity question though I'm not sure what you are asking.

I'll move the thread to the ChronoConnectivity forum.

Bob
admin_wiky 20 Aug, 2014
Hi Bob,

thx 4 moving.
I will present on example. table with two columns:
nonunique_id;value
--------------------------
1;5
1;10
1;2
2;3
2;20


and I need it group by nonunique_id and sum it.
then result shoud be;
nonunique_id;value
--------------------------
1;17
2;23
admin_wiky 28 Aug, 2014
I can answer myself🙂
It is a combination of settings in the model.
First you must set fields
sum (field_name), sum (field_name2) ...

and of course group by
date

then shows the cumulative results by group.

But I have a problem with multiplication. I tried something like
sum (field1 * field2)

but joomla throws errors.
This topic is locked and no more replies can be posted.