Lucee Function Reference
querysort()
Sorts the query based on the column specified and the order criteria given. Modifies the original query object
Example
querysort(query query,any columnNameOrSortFunc,[string direction]):boolean
Category
query,sort
Arguments
The arguments for this function are set. You can not use other arguments except the following ones.
Name | Type | Required | Default Value | Description |
---|---|---|---|---|
query | query | Yes | the query to sort | |
columnNameOrSortFunc | any | Yes | a list of names, a single column name or a function used as comparator. | |
direction | string | No | a list of directions or a single direction definition (asc,desc), the list must have the same length as the columnName list. ONly used when the second argument defines a list of column names. |