I'm trying to set the SQL query ORDER BY to DESC on my control loop for the IDOM.
I've got r 301 and added this to the _config file in the dataobject_manager folder:
My images are still sorted in ASC order. Here is the SQL query:
SELECT `Surfboard`.*, `Surfboard`.ID, if(`Surfboard`.ClassName,`Surfboard`.ClassName,'Surfboard') AS RecordClassName FROM `Surfboard` WHERE (SurfboardPageID = '6')
And the query for each individual ID within that query:
SELECT `File`.*, `File`.ID, if(`File`.ClassName,`File`.ClassName,'File') AS RecordClassName FROM `File` WHERE (`File`.`ID` = 46) ORDER BY SortOrder DESC LIMIT 1
It seems like I'd want to set the SortOrder DESC in the first query above, not the second one, as the second query has the LIMIT 1 so a sort order on a single item query is useless. It's the only item so there is nothing to order.
Whereas if the SortOrder DESC was on the first query that pulled all the image IDs, it would sort them all in the preferred manner set in the _config file.