[TYPO3-english] TYPO3 TS userlisting: using AVG, SUM etc in select

Bert Hiddink [BENDOO e-work solutions] hiddink at bendoo.nl
Fri Dec 6 13:39:48 CET 2013


Hello Christian,

Ah, thanks, I got it!!

Regards,
Bert

On 06-12-13 12:00, Christian Hennecke wrote:
> Am 06.12.13 11:47, schrieb Bert Hiddink [BENDOO e-work solutions]:
>> Hello Christian,
>>
>> Thanks for your reply...
>>
>> On 06-12-13 11:32, Christian Hennecke wrote:
>>
>>> [snip]
>>>
>>> You could make lib.userlisting a COA and add another CONTENT object with
>>>
>>> selectFields = type, SUM(tx_feuserextrafields_donation)
>>
>> OK but how should I render this part in order to show the total?
>>
>>   renderObj=COA
>>    renderObj{
>>
>>      #Show total here of field tx_feuserextrafields_donation
>>      10=TEXT
>>      10.field=tx_feuserextrafields_donation ####?????
>>      10.wrap =<td>|</td>
>> ....
>
> Ah, sorry. You need to assign a new field name with AS:
>
> selectFields = type, SUM(tx_feuserextrafields_donation) AS total_donation
>
> and then
>
> renderObj=COA
> renderObj{
>    #Show total here of field tx_feuserextrafields_donation
>    10=TEXT
>    10.field= total_donation
>    10.wrap =<td>|</td>
>



More information about the TYPO3-english mailing list