[postgis-users] Dynamic Filter

Carl Anderson carl.anderson at vadose.org
Fri Apr 30 17:08:58 PDT 2004


On 04/30/2004 06:00:59 PM, Zamil Murji wrote:
> Hello list,
> 
> I have a PostGIS layer in my .map file that displays just fine. Now I
> want to filter that layer based on a column called source. I know how
> to do static filter using FILTER, but I don't know how to handle
> dynamic filtering. Here is my FILTER statement that works:
> 
> FILTER "digital_tape_log = 'Y'"
> 
> Now I want it to look like so:
> 
> FILTER "digital_tape_log = 'whatevertheuserpassesin'"

This is a Mapserver Question:

Look at "Variable Substitution" in the Mapfile Doc

and use

FILTER "digital_tape_log = '%WANT_LOG%'"

and add
   WANT_LOG=whatevertheuserpassesin

to the end of the map request through the form in map.html or any other  
means.




More information about the postgis-users mailing list