[mapguide-users] Re: Search/Query Results - Question
Steve G
steve.golden at morganhill.ca.gov
Fri Aug 5 11:58:30 EDT 2011
In order to sort your search query you have to make sure that the FDO
provider supports SelectOrdering. You can get the provider capabilities
using mapagent (go to Feature>GetCapabilities). Just type in the correct
provider and search the feature provider capabilities return for
"SupportsSelectOrdering". If this equals "true" then the provider will
allowing sorting, if false then it cannot (you might have to write some
custom code to sort the results).
Supposing you are using the standard search function, you can use the
following (enter into search.php):
// set ordering
$stringCollection = new MgStringCollection();
$stringCollection->Add("c_ref"); // SORT FIELD
$queryOptions->SetOrderingFilter($stringCollection,
MgOrderingOption::Descending); // SORT Asc or Desc
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Search-Query-Results-Question-tp6654244p6657053.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
More information about the mapguide-users
mailing list