[TYPO3-english] TYPO3 TS userlisting: using AVG, SUM etc in select
Christian Hennecke
ch at moon-agentur.de
Fri Dec 6 11:32:06 CET 2013
Am 06.12.13 10:48, schrieb Bert Hiddink [BENDOO e-work solutions]:
> Hello,
>
> Please have a look at the following snippet which gives me a list of
> FE-users...So far, so good...
>
> However, at the end of the listing, I would like to render some overall
> averages, totals of some of the fields displayed...fe. the total of the
> field "tx_feuserextrafields_donation"...
>
> Using MySQL directly, this would be something like:
> SELECT type, SUM(tx_feuserextrafields_donation) FROM fe_users
>
> But how could I integrate something like that in the snippet below in
> the "select" part? Never done something like that so I hope you can give
> me some pointers/ideas?
>
> Thanks in advance!
> Bert
>
[snip]
You could make lib.userlisting a COA and add another CONTENT object with
selectFields = type, SUM(tx_feuserextrafields_donation)
Cheers,
Christian
More information about the TYPO3-english
mailing list