Can't figure ItemQuery Out
Ryan, Adam
ARyan at CO.LINN.OR.US
Tue Oct 26 14:21:30 PDT 2004
Leo,
On a lark, try it as a regular expression:
('[A1RENUM]' =~ /^33768-000-000$/)
Adam
-----Original Message-----
From: Leo Dolan [mailto:leo at ENNEAD.COM]
Sent: Tuesday, October 26, 2004 12:50 PM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: [UMN_MAPSERVER-USERS] Can't figure ItemQuery Out
I've been working on this all day and can't seem to figure it out.
I'm on Mapserver v 4.2 on Windows. Here is the Mapfile:
MAP
NAME "CRA 2000"
STATUS ON
SIZE 600 420
IMAGECOLOR 230 230 230
IMAGETYPE PNG24
EXTENT 1518976.125000 454307.531250 1565951.625000 426016.062500
SHAPEPATH "shapefiles/parcels2000"
WEB
TEMPLATE "printable.html"
IMAGEPATH "tmp/" # full path to image tmp dir, so cgi can find it
IMAGEURL "tmp/" # url location of image tmp dir, so web browser can find
it
END # Web Interface Options
QUERYMAP
STATUS ON
STYLE SELECTED
COLOR 255 255 0
END
#############################
# Start of layer definitions
#----------------------------------------------------------------------
LAYER # start of the "main" layer object
NAME "2000_Bay_County"
DATA parcels2000
STATUS ON
TYPE POLYGON
TEMPLATE "parcels2000_query.html"
HEADER "parcels2000_header.html"
FOOTER "parcels2000_footer.html"
CLASS
NAME "Bay County 2000 Parcels"
OUTLINECOLOR 0 204 0
END
END # end of layer object
#----------------------------------------------------------------------
END # Map File
And here is the form that submits a test query:
<form name="test" action="mapserv.exe" method="get" target="info">
<input type="hidden" name="mapext" value="shapes">
<input type="hidden" name="map" value="cra2000.map">
<input type="hidden" name="mode" value="itemquery">
<input type="hidden" name="qlayer" value="2000_Bay_County">
<input type="hidden" name="qitem" value="A1RENUM">
<input type="hidden" name="qstring" value="33768-000-000">
<input type="submit" value="Get Parcel Query">
</form>
Anytime I submit this, however, I get the following message:
msQueryByAttributes(): Search returned no results. No matching record(s)
found.
I've tried multiple variations, such as type in the parameters into the URL,
eliminating the qitem value and passing qstring as
('[A1RENUM]'='33768-000-000'), etc. I know that there is a value in the
parameters table for '33768-000-000', and I've tried other values for it,
and other fields to try and query against with no succes. If somebody
knows what I'm doing wrong, I would appreciate being pointed in the right
direction. Thanks in advance!
Sincerely,
Leo T. Dolan
More information about the MapServer-users
mailing list