Quoting Oscar Testa <otesta@siu.edu.ar>:
> I have a table with map objects in postgre/postgis.  I want add information
> from other tables in postgresql to create thematic mappings in mapserver.
> How can i do this??

This is exactly what my example was intending to show. Once you have done the 
subselect, and added the data from the second table (b.data in my example) you 
can then have use mapserver classes to define themes based on that data. 
Consider a slight variation of my original example:

DATA "the_geom FROM (SELECT a.oid AS oid, a.the_geom AS the_geom, b.type AS 
type FROM a, b WHERE a.key = b.key) AS foo USING SRID=-1 USING UNIQUE oid"
CLASSITEM "type"
CLASS
  EXPRESSION "1"
  COLOR 255 0 0
END
CLASS
  EXPRESSION "2"
  COLOR 0 255 0
END

So, the geometry data is in table "a", and the classification information is in 
a related table "b", in the column named type. Using the standard mapserver 
classifcations/theming I have specified that type "1" features should be 
colored red, and type "2" features should be colored blue. 

Does this give you what you need to know? Basically, as long as you can write a 
query that puts the geometry next to the classification variable, then you can 
let mapserver do the rest.

Chris






