[mapserver-users] map_layer_filter

Lowther, David W dlowther at ou.edu
Mon Oct 28 12:56:06 PST 2002


Howdy List,

I'm trying to pass in a setting for map_layer_filter from a form. It looks
something like this:

<form method="post" action="http://domain/cgi-bin/mapserv.exe" target=map
name="Master">
	<input type=hidden name="map" value="something.map">
	<input type=hidden name="map_sqlParcel_filter" value="pnum in
('3400-00-001-001-0-001-00','3400-00-001-001-0-002-00')">
	<input type=hidden name=layers value="cnty_poly sqlParcel">
</form>

The layer comes from PostGIS and everything works fine when set the filter
in the mapfile. I get an error that looks like this:

msPOSTGISLayerWhichShapes(): Query error. prep_DB:Error executing POSTGIS
DECLARE statement (0.6 failed - retried 0.5 and it failed too). DECLARE
mycursor BINARY CURSOR FOR SELECT
asbinary(force_collection(force_2d(the_geom)),'NDR'),OID::text from (select
oid,* from a047parcel) as foo WHERE (pnum in ) and (the_geom && setSRID(
'BOX3D(-98.1769012540527 36.1434604724575,-97.4028596973514
36.6100900285963)'::BOX3D,find_srid('','a047parcel','the_geom') )) 

My best guess is that this has something to do with the quotation marks
coming from the form. Does anybody have any ideas on this one?

Thanks for your help.

David Lowther




More information about the MapServer-users mailing list