[mapserver-users] msQueryByAttributes(): Search returned no r esults. No matching re cord(s) found.

KRUSEMARK Matthew G matthew.g.krusemark at co.multnomah.or.us
Thu Oct 10 08:32:51 PDT 2002


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