[Mapserver-users] setFilter expression error
Armin Burger
armin.burger at libero.it
Mon Aug 18 15:07:10 PDT 2003
Nick,
this method has changed in MS 4:
You don't use any more the setFilter() and put everything into the
queryByAttributes() function. Should be something like
$countyLayer->queryByAttributes('NAME','leflore', $mapscript::MS_SINGLE);
(I believe the query item has to be in upper case for shapefiles and
without the brackets)
This way I think you cannot use any longer more than one query item.
Armin
> I'm trying to run a queryByAttribute on a layer. I've set up the
following
> filter expression:
> $countyLayer->setFilter("('[Name]' = 'leflore')");
> searching for the string leflore.
> I then run the queryByAttributes;
> $countyLayer->queryByAttributes($map,$mapscript::MS_SINGLE);
> This produces the following error:
> Mon Aug 18 16:17:06 2003 - msyyparse(): Expression parser error. parse
error
> Mon Aug 18 16:17:06 2003 - msQueryByAttributes(): Search returned no
> results. No matching record(s) found.
> However, I can't really see anything wrong with my expression. I'm
using
> mapscript 4.0. Any ideas?
> Nick Petersen-Bergeron
> System Administrator
> ZedX Inc.
> 369 Rolling Ridge Drive
> Bellefonte, PA. 16823
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
More information about the MapServer-users
mailing list