getFilter() & setFilter() with PHP Mapscript
Armin Burger
armin.burger at GMX.NET
Thu Nov 16 12:58:55 PST 2006
Hi everybody
in PHP Mapscript the 'getFilter()' request applied on PostGIS layers
having a filter defined in the map file returns a string already put
into double quotes. This seems to be so since Mapserver 4.6. Since
Mapserver 4.10 also the reverse 'setFilter()' seems to work only
correctly for PostGIS layers if the filter is defined as string with
literal double quotes around.
So that's not working:
$mylayer->setFilter("field_1 = 2 AND field_2 = 2004");
That's working:
$mylayer->setFilter('"field_1 = 2 AND field_2 = 2004"');
I wonder if this is an intended 'feature'.
Armin
More information about the MapServer-users
mailing list