[Mapserver-users] why --> msQueryByAttributes(): Query error. No query expression defined
Javier Castillejo Montes
jcastil1 at tragsa.es
Tue Jul 6 06:00:55 PDT 2004
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_000_01C46359.47B31798
Content-Type: multipart/alternative;
boundary="----_=_NextPart_001_01C46359.47B31798"
------_=_NextPart_001_01C46359.47B31798
Content-Type: text/plain;
charset="iso-8859-1"
Hi all,
Does anyone know why this code has an error. I'm just trying to use a
mapserver example from the internet, I copied the code made the changes
necesaries and... ERROR!!!! :-(
### ERROR:
msQueryByAttributes(): Query error. No query expression defined.
### main html
<html>
<body>
<form name="mapserv" method="get" action="//[host]/scripts/mapserv.exe">
<input type="text" name="mapserv" value="//[host]/scripts/mapserv.exe"
size=100%>
<input type="text" name="map" value="[path]/map/case1.map" size=100%>
<input type="text" name="map_web_imagepath" value="[path]/tmp/" size=100%>
<input type="text" name="map_web_imageurl" value="[path]/tmp/">
<input type="text" name="mode" value="itemquery" size=100%>
<input type="text" name="qlayer" value="provin" size=100%>
<br><br><br><br><br><br>
Select
<input type="text" name="name" id="name" value="mad">
<br>
<input type="submit" value="Go!">
</form>
</body>
</html>
## map file
MAP
NAME case1
SHAPEPATH "../data"
SIZE 300 300
EXTENT -50000 4000000 1100000 4800000
WEB
IMAGEPATH '../data/tmp/'
IMAGEURL '../data/tmp/'
END
QUERYMAP
STATUS ON
STYLE HILITE
COLOR 255 255 0
END
LAYER
NAME provin
DATA provin
STATUS DEFAULT
TYPE POLYGON
FILTERITEM nombre
FILTER "%name%"
CLASS
COLOR 212 212 212
OUTLINECOLOR 0 0 0
TEMPLATE "../html/case1_template.html"
END
END
END
### template file
<html>
<head>
<title>MapServer Test Suite - ItemQuery</title>
</head>
<body bgcolor="#ffffff">
<font size="+2" face="arial,helvetica"><b>Case 1: Simple ItemQuery With
QueryMap</b></font>
<p>
This is just a simple dump of a few attributes for an individual polygon
in the test suites counties layer:
<p>
<b>Name:</b> [Name]<br>
<b>ID Provincia:</b> [prov]<br>
<b>Comunidad Code:</b> [Comunidadc]<br>
<p>
and here's the map of the query results (you can zoom to a set of results as
well):
<p>
<table cellpadding="5">
<tr>
<td><img border="2" src="[img]" height="300" width="300"></td>
<td><img border="2"
src="[mapserv]?map=[map]&name=[name_esc]&mode=itemquerymap&mapext=shapes&qla
yer=[qlayer]" height="300" width="300"></td>
</tr>
</table>
</body>
</html>
thanks in advance
------_=_NextPart_001_01C46359.47B31798
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<TITLE>TRAGSA Dise=F1o de fondo</TITLE>
<META content=3D"MSHTML 6.00.2800.1400" name=3DGENERATOR></HEAD>
<BODY style=3D"BACKGROUND-COLOR: #ffffff" bgColor=3D#ffffff=20
background=3Dcid:390565912 at 06072004-11ba>
<DIV><FONT face=3DArial size=3D2>Hi all,</FONT></DIV>
<DIV> </DIV>
<DIV><BR><FONT face=3DArial size=3D2>Does anyone know why this code has =
an error.=20
I'm just trying to use a mapserver example from the internet, I =
copied the=20
code made the changes necesaries and... ERROR!!!! :-(</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><BR><FONT face=3DArial size=3D2>### ERROR: =20
<BR> msQueryByAttributes(): Query error. No query expression =
defined.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>### main html</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><BR><FONT face=3DArial =
size=3D2><html><BR><body><BR><form=20
name=3D"mapserv" method=3D"get"=20
action=3D"//[host]/scripts/mapserv.exe"><BR><input type=3D"text"=20
name=3D"mapserv" value=3D"//[host]/scripts/mapserv.exe" =20
size=3D100%><BR><input type=3D"text" name=3D"map" =
value=3D"[path]/map/case1.map"=20
size=3D100%><BR><input type=3D"text" name=3D"map_web_imagepath"=20
value=3D"[path]/tmp/" size=3D100%><BR><input type=3D"text"=20
name=3D"map_web_imageurl" value=3D"[path]/tmp/"><BR><input =
type=3D"text"=20
name=3D"mode" value=3D"itemquery" size=3D100%><BR><input =
type=3D"text"=20
name=3D"qlayer" value=3D"provin" size=3D100%></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial=20
size=3D2><br><br><br><br><br><br><BR=
>Select</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><input type=3D"text" name=3D"name" =
id=3D"name"=20
value=3D"mad"></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><br></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><input type=3D"submit"=20
value=3D"Go!"></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial=20
size=3D2></form><BR></body><BR></html></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><BR><FONT face=3DArial size=3D2>## map file</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>MAP<BR> NAME case1<BR> =20
SHAPEPATH "../data"<BR> SIZE 300=20
300<BR> EXTENT -50000 4000000 1100000 4800000</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2> WEB<BR> =
IMAGEPATH=20
'../data/tmp/'<BR> IMAGEURL =
'../data/tmp/'<BR> =20
END</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2> QUERYMAP<BR> =
STATUS=20
ON<BR> STYLE HILITE<BR> COLOR 255 =
255=20
0<BR> END</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2> LAYER<BR> =
NAME=20
provin<BR> DATA provin<BR> STATUS=20
DEFAULT<BR> TYPE POLYGON<BR> =
FILTERITEM=20
nombre<BR> FILTER "%name%"<BR> =20
CLASS<BR> COLOR 212 212=20
212<BR> OUTLINECOLOR 0 0=20
0<BR> TEMPLATE=20
"../html/case1_template.html"<BR> END<BR> =20
END</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>END</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><BR><FONT face=3DArial size=3D2>### template file</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><html><BR><head><BR> =
<title>MapServer Test Suite -=20
ItemQuery</title><BR></head></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><body =
bgcolor=3D"#ffffff"></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><font size=3D"+2"=20
face=3D"arial,helvetica"><b>Case 1: Simple ItemQuery With=20
QueryMap</b></font></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><p></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>This is just a simple dump of a few =
attributes for=20
an individual polygon<BR>in the test suites counties =
layer:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><p></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><b>Name:</b>=20
[Name]<br><BR><b>ID Provincia:</b>=20
[prov]<br><BR><b>Comunidad Code:</b>=20
[Comunidadc]<br></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><p></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>and here's the map of the query =
results (you can=20
zoom to a set of results as well):</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><p></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><table=20
cellpadding=3D"5"><BR><tr><BR><td><img border=3D"2" =
src=3D"[img]"=20
height=3D"300" width=3D"300"></td><BR><td><img =
border=3D"2"=20
src=3D"[mapserv]?map=3D[map]&name=3D[name_esc]&mode=3Ditemquerym=
ap&mapext=3Dshapes&qlayer=3D[qlayer]"=20
height=3D"300"=20
width=3D"300"></td><BR></tr><BR></table></FONT></DI=
V>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial =
size=3D2></body><BR></html></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><SPAN class=3D390565912-06072004><FONT face=3DArial =
size=3D2>thanks in=20
advance</FONT></SPAN></DIV></BODY></HTML>
------_=_NextPart_001_01C46359.47B31798--
------_=_NextPart_000_01C46359.47B31798
Content-Type: image/jpeg;
name="pictogramatragsa.jpg"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="pictogramatragsa.jpg"
Content-ID: <390565912 at 06072004-11ba>
/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsK
CwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/wAALCAFDARgBAREA/8QAHwAAAQUBAQEB
AQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1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p96o3ALzucd8U+JcCrMYq
aiiiiiiiiiiiiiiiiiiiiiiiiiiiikIzTGSo2jqPYM9Keq1Mgp9FFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFIVBpuygJTgMUtFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFf//Z
------_=_NextPart_000_01C46359.47B31798--
More information about the MapServer-users
mailing list