SV: [mapserver-users] map_layer_filter

Bjarni Pjetursson Bjarni.Pjetursson at tietoenator.com
Tue Oct 29 04:33:35 EST 2002


Try quoting your field with both single-plings and double-plings like this
<input type="text" name="map_layername_filtername" value='"conditions"'>
Regards
Bjarni Thor Pjetursson

> -----Oprindelig meddelelse-----
> Fra:	Lowther, David W [SMTP:dlowther at ou.edu]
> Sendt:	28. oktober 2002 21:56
> Til:	Mapserver-Users (E-mail)
> Emne:	[mapserver-users] map_layer_filter
> 
> 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