[Mapserver-users] querybyattributes logical expression

AARON KONING aaronkoning at shaw.ca
Wed May 26 13:53:57 EDT 2004


Hi,

I have also used different operators in class expressions. I tried your suggestion but it did not work. Strangely the single quotes are needed regardless of the data type of the field. So that the following query does work:

$queryString = "('[AREA]' = '10')"
$queryItem = 'AREA';
> >    $map->querybyattributes($queryitem,$queryString,MS_MULTIPLE);



----- Original Message -----
From: Eric Bridger <eric at gomoos.org>
Date: Wednesday, May 26, 2004 4:03 am
Subject: Re: [Mapserver-users] querybyattributes logical expression

> At 11:11 PM 05/25/2004 -0700, AARON KONING wrote:
> >Hi List,
> >
> >Just wondering if anyone has had success using
> >querybyattributes with the '>', '<', '>=', '<=' operators? I have 
> been using the 'NOT', 'AND', 'OR',
> >and '=' operators with success. 
> >
> >The following statement fails:
> >
> >    $queryString = "('[AREA]' > '10')"
> >    $queryItem = 'AREA';
> >    $map->querybyattributes($queryitem,$queryString,MS_MULTIPLE);
> 
> I haven't used querybyattributes() but have use comparison 
> operators in CLASS EXPRESSION's.
> I would try:
> "([AREA] > 10)"  i.e. these are number values not strings.
> 
> _______________________________________________
> 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