MapGuide API Reference
 All Classes Functions Variables Enumerations Enumerator Friends
void MgFeatureQueryOptions::SetOrderingFilter ( MgStringCollection orderByProperties,
INT32  orderOption 
)

Use this method to specify the order (ascending or descending) in which the selected features are returned.

.NET Syntax
void SetOrderingFilter(MgStringCollection orderByProperties, int orderOption);
Java Syntax
void SetOrderingFilter(MgStringCollection orderByProperties, int orderOption);
PHP Syntax
void SetOrderingFilter(MgStringCollection orderByProperties, int orderOption);
Parameters:
orderByProperties(MgStringCollection) The collection of properties to which the ordering option specified in the second parameter is applied.
orderOption(int) The ordering option, MgOrderingOption::Ascending or MgOrderingOption::Descending.
Returns:
Nothing
Example (PHP)
aDouble is a double property. anInt32Key is the identity property. The first example returns aDouble values in ascending order, and the second example returns them in descending order.

 <?php
 $queryOptions->AddFeatureProperty("aDouble");
 $queryOptions->AddFeatureProperty("anInt32Key");
 $stringCollection->Add("aDouble");
 $queryOptions->SetOrderingFilter($stringCollection, MgOrderingOption::Ascending);
 $featureService->SelectFeatures($featureSrcResourceId, $featClassName, $queryOptions);
 $queryOptions->SetOrderingFilter($stringCollection, MgOrderingOption::Descending);
 $featureService->SelectFeatures($featureSrcResourceId, $featClassName, $queryOptions);
 ?>
 sqlplus> select anint32key,adouble from universalclassxy order by adouble ASC;
 sqlplus> select anint32key,adouble from universalclassxy order by adouble DESC;
Exceptions:
MgInvalidArgumentException