Home » Item #466
I would like to display the version sorted by price in DESCENDING order (largest to smallest). How is that accomplished?
The basic instructions for controlling ordering are dealt with here:
www.cactushop.com/support/viewitem.asp?recor=0&ID=328
To get items ordered by descending order, add "DESC" to the end of the "order by" statement, for example:
ORDER BY V_Price DESC
This works for fields that are numeric, alphabetical or dates. To order in ascending order, the code is:
ORDER BY V_Price ASC
...however, since this is the default direction, it is more normally written as just:
ORDER BY V_Price