Railo 4.2 Reference
Choose a function:

Function QUERYREDUCE

Iterates over every row of the given query and calls the closure with that row.
      This function will reduce the query to a single value and will return this value.

Beispiel

queryreduce(query query,function closure,[object initalValue]):any

Argumente

Die Argumente für diese Funktion sind fest vorgegeben. Ausser den nachfolgenden Argumenten dürfen keine weiteren verwendet werden.
Name Typ Required Beschreibung
query query  Yes query to iterate  
closure function  Yes function/closure that implements the following constructor [function(any result, struct row[, number rowNumber, query query]):any].  
initalValue object  No inital value passed as part of the first closure call