[Mapserver-users] setFilter expression error
Lowell Filak
lfilak at medinaco.org
Tue Aug 19 06:10:02 PDT 2003
Depending on which doc your looking at it may still be in transition.
Lowell
The following message was sent by Nick Petersen-Bergeron
<bergeron at zedxinc.com> on Tue, 19 Aug 2003 08:49:53 -0400.
> Hmmm....the documentation on the mapserver site still has it using
> setFilter. I did try changing the query to your method, but got a syntax
> error. If this has changed, does anyone know the proper syntax?
>
> Nick
>
> At 11:07 PM 8/18/2003 +0100, Armin Burger wrote:
> >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
> >
> >_______________________________________________
> >Mapserver-users mailing list
> >Mapserver-users at lists.gis.umn.edu
> >http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
>
> 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