I asked the same question because in SQL you can, but in DMQL you cannot, as was stated. However, there is an easy method and answer for you, by using one of PHP's library of sort functions. You can sort the entire returned array by a specific KEY.
SINGLE KEY: ASC (List of Cities)
If you want to get a list of cities your MLS serves, you can sort that list alphabetically with ASORT() to sort from LOW to HIGH (or think alphabetically):
asort($cities);
MULTIPLE-KEYS: DESC (Newest Listings First)
To order a list of properties, with multiple keys (fields), in the order of most recently listed, you sort the list with ARSORT() which is from NEWEST to OLDEST (HIGH to LOW).
array_multisort($tempArray['Date_Listed'],SORT_DESC,SORT_LOCALE_STRING,$listings);
MULTIPLE-KEYS: ASC (Lowest Priced Property First)
To a list of properties containing (Address, City, Asking_Price), in lowest price order, your code would be:
array_multisort($tempArray['Asking_Price'],SORT_ASC, SORT_NUMERIC,$listings);
ABOUT: tempArray
You will need to parse your array into one or more tempArrays using a FOR / EACH
loop. Then use these tempArrays in yourarray_multisort()
lines. I only showed an example of using a single KEY in a multi-key array.
RESOURCES