[mapserver-users] msQueryByAttributes(): Search returned no results. No matching re cord(s) foun

Steve Lime steve.lime at dnr.state.mn.us
Thu Oct 10 12:33:53 PDT 2002


Wait until 3.7 when things change (for the better). Admittedly attribute
queries suck in 3.5/6 because part of the process is in the map file and
part in the HTML. They are very powerfull, but tricky to use. In 3.7
that changes and uses a simpler model. You'll specify the mode, qlayer,
qitem (optional) and a qstring (i.e. a MapServer expression) all from
the HTML page. No filters (although that's still the mechanism used
internally) to deal with. Just build the expression in the HTML page 
and submit it, period. This does away with the confusion in how a filter
is used when you're not querying that layer.

Steve

Stephen Lime
Data & Applications Manager

Minnesota DNR
500 Lafayette Road
St. Paul, MN 55155
651-297-2937

>>> KRUSEMARK Matthew G <matthew.g.krusemark at co.multnomah.or.us>
10/10/02 10:32AM >>>
Just wanted to send a big thanks to Robert Stanton, Anwar Hussain,
Gunter
Rieth, Perry Nacionales and Steve Lime for helping me understand the
FILTER
and FILTERITEM params in 3.6.

Kind regards,-matthew  

-----Original Message-----
From: Robert Stanton [mailto:geosys at iafrica.com] 
Sent: Thursday, October 10, 2002 2:51 AM
To: KRUSEMARK Matthew G
Subject: Re: [mapserver-users] msQueryByAttributes(): Search returned
no
results. No matching re cord(s) found.


Hi Matthew

In your 'FILTER "%cty_name%"  ' statement I believe you are passing the
dbf
column name to mapserver where you should be passing the value in a
field in
that column.

In my map file I have:
FILTERITEM "cty_name"
FILTER "%value%"

and I then pass the %value% to mapserver either by:

<input type="hidden" name="item" value="cty_name">
<input type="hidden" name="value"
value="actual_value_in_the_required_field">

in the html file, or:

&item=cty_name&value=actual_value_in_the_required_field

in a url, or select the value from a option select list in the html
file,
using name="value"

All this had me fooled for a long time until I understood the
'item/value'
parameter passing. I hope this helps.

Regards

Robert Stanton
Durban
South Africa




----- Original Message -----
From: "KRUSEMARK Matthew G" <matthew.g.krusemark at co.multnomah.or.us>
To: <mapserver-users at lists.gis.umn.edu>
Sent: Wednesday, October 09, 2002 2:00 AM
Subject: [mapserver-users] msQueryByAttributes(): Search returned no
results. No matching re cord(s) found.


> Hello,
>
> I am having trouble with ItemQuery in 3.6.  My error message is:
>
> msQueryByAttributes(): Search returned no results. No matching 
> record(s) found.
>
> I have the qlayer set as such:
>
> <input type="hidden" name="map" 
>
value="D:\Inetpub\wwwroot\gisshare_web\mapserver_demo36\itasca\case1.m
> ap">
> <input type="hidden" name="qlayer" value="county">
> <input type="hidden" name="mode" value="itemquery">
> <input type="hidden" name="item" value="cty_name">
>
> ... But may be making mistakes on the syntax of the FILTER and 
> FILTERITEM params, I checked the docs and tried a few things,
however, 
> nothing successful yet.  Piece of mapfile:
>
> LAYER
>     NAME county
>     DATA county
>     STATUS DEFAULT
>     TYPE POLYGON
>     FILTERITEM cty_name
>     FILTER "%cty_name%"
> CLASS
>         NAME county
>   COLOR 212 212 212
>         OUTLINECOLOR 0 0 0
>         TEMPLATE case1_template.html
>       END
>     END
>
> Thanks in advance for any assistance on this, kind regards,-matthew
>



More information about the MapServer-users mailing list