Reputation: 1
Can I Add SQL QUERY in EXPRESSION MAPFILE ? like this ..
CLASS
Name '> 0'
EXPRESSION (SELECT * from tb_kelurahan where id_kecamatan='[id_kecamatan]' > 0)
COLOR 20 215 0
OUTLINECOLOR 0 0 0
END # Class
Upvotes: 0
Views: 287
Reputation: 1110
No. But as an alternative you can add the sql as an additional column to the DATA statement and then reference that in the expression.
DATA "the_geom from (select case when id_kecamatan>0 then 1 else 0 end as myexpress, the_geom, ...) as foo ...."
and then use:
EXPRESSION ([myexpress] = 1)
Upvotes: 2