Querying Multiple Items using queryByAttributes

Frank Warmerdam warmerdam at POBOX.COM
Fri Apr 21 10:23:16 EDT 2006


Sean Fadum wrote:
> Hi,
> 
> Does anyone know if it is possible to query multiple fields using
> Mapscript's queryByAttributes?  If so does anyone have the syntax for this?
> I am able to query one field as of right now but would like to be able a
> bunch of fields.  I am using php/mapscript for this project.

Sean,

I think the trick is to use a query expression instead of a query
item and a query value.

I'm not sure how this works in mapscript exactly, but at the C API
level if you pass a NULL for the query item then the value is
interpreted as a full expression which could be something like:

  "[fielda] < 100 and [fieldb] = 75"

... I think.

Anways, hopefully that is an angle to look into.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGF, http://osgeo.org



More information about the mapserver-users mailing list