[Mapserver-users] 3.7 itemquery
Steve Lime
steve.lime at dnr.state.mn.us
Wed Feb 26 10:40:39 PST 2003
The old method was convoluted because parts of the process were in HTML
forms and others in the map file. The changes have made it more self
contained. Now you specify query parameters external to the mapfile,
period. There are 2 new CGI variables: qitem and qstring (qlayer is also
used but has been around forever). So, to set up an attribute query
you:
- set qlayer to the appropriate layer name
- set qitem to the appropriate column name (not used for logical
expressions)
- set qstring to a valid MapServer expression, string comparison,
regular or logical
How you build the qstring is up to you. From MapScript the process is
the same. The method exists only at the layer level. It looks like:
queryByAttributes(mapObj *map, char *qitem, char *qstring, int
mode);
where mode = MS_MULTIPLE or MS_SINGLE. If a layer already has a FILTER
defined those restrictions are not applied in addition to the qstring.
Glad to answer any other questions.
Steve
Stephen Lime
Data & Applications Manager
Minnesota DNR
500 Lafayette Road
St. Paul, MN 55155
651-297-2937
>>> Oliver Wesp <wesp at gdv.com> 02/26/03 11:48AM >>>
Hi,
I'm struggling with 3.7 itemquery, itemnquery modes. The migration
guide
tells me that these have changed 'and should be much easier to
use'. That's good news but is there there any information available on
how
to get things working again? All I got so far is
'msQueryByAttributes():
Query error. No query expression defined.'
Any hint is appreciated.
Oliver
--
Dipl.-Geogr. Oliver Wesp
Gesellschaft für geografische Datenverarbeitung
Binger Strasse 49-51
D-55218 Ingelheim
fon: +49 6132 714818
fax: +49 6132 714828
http: <http://www.gdv.com>www.gdv.com
_______________________________________________
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