[Mapserver-users] postgis order by

David Blasby dblasby@refractions.net
Tue, 16 Mar 2004 11:39:04 -0800


Nick Petersen-Bergeron wrote:

> The order by seems to be ignored doing this.

1. are you ordering in the correct direction?  (i.e. the query I gave 
you puts them in "1,2,3,4..." order.  If you want them in 
"100,99,98,..." order, you'll need to add 'DESC' to your query.)

2. is the column your sorting on the correct datatype?  For example, if 
you have integer values stored as strings, the sort will be incorrect 
(i.e. "1","10","100","11",...).

If you put a "DEBUG TRUE" in your layer, and you see the "ORDER BY" 
clause in your query, then the database is almost certainly doing what 
you ask.

dave
_______________________________________________
Mapserver-users mailing list
Mapserver-users@lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users