I am attempting to add rows to a query and then re-sort the query. I am adding the rows with queryAddRow()
, and would then like to use querySort()
to re-sort.
My MySQL query has a sort operation as such (I am sorting in directional order of a compass rose, the column is 'Direction'
):
ORDER BY FIELD(Direction, 'N', 'NNE', 'NE', 'ENE', 'E', 'ESE', 'SE', 'SSE', 'S', 'SSW', 'SW', 'WSW', 'W', 'WNW', 'NW', 'NNW')
I would like to replicate this functionality using querySort()
, if it’s possible. I see hints that this may be possible in the Lucee.org documentation, but no examples or guidance. Does anybody have thoughts on how this could be done? Thank you in advance!