[mapserver-users] =?big5?B?SG93IHRvIHVzZSBQb3N0R0lTIHdpdGggaXRlbXF1ZXJ5Pw==?=
=?big5?B?czg4NTQ2MTc=?=
s8854617 at sinamail.com
Mon Feb 4 00:53:39 EST 2002
Hi everybody:
I am trying using MapServer with itemquery to access the table in
PostGIS. But I got a message:
msPOSTGISLayerWhichShapes(): Query error. prep_DB:Error executing
POSTGIS DECLARE statement (0.6 failed - retried 0.5 and it failed
too).
Following is my template & map files:
My template HTML:
<html>
<head>
<title>Let US GO! GO! GO!</title>
</head>
<body>
<br>
<form method="get" action="/cgi-bin/mapserv">
<input type="hidden" name="map" value="/var/www/html/itasca/tuto4.map">
<input type="hidden" name="mode" value="itemquery">
<input type="hidden" name="qlayer" value="test">
The ID:<input size=1 name="judger">
<input type="submit" value="submit">
</form>
</body>
</html>
My tuto4.map (Map file) is:
NAME EX3
SIZE 500 400
EXTENT 208385 2672226 209810 2673639
FONTSET /var/www/html/itasca/fonts.list
UNITS meters
IMAGECOLOR 255 255 255
IMAGETYPE PNG
WEB
IMAGEPATH "/var/www/html/tmp/"
IMAGEURL "/tmp/"
END
QUERYMAP
STATUS ON
STYLE HILITE
COLOR 255 255 0
END
LAYER
NAME test
CONNECTIONTYPE postgis
CONNECTION "user=postgres dbname=testdb"
DATA "shape from post_map"
STATUS DEFAULT
TYPE POLYGON
FILTER "value_08 = judger"
CLASS
COLOR 0 255 0
OUTLINECOLOR 0 0 0
TEMPLATE tuto3_show.html
END
END
END # Fim do MapFile
My query template tuto3_show.html:
<html>
<head>
<title>That is a SHOW!!</title>
<body bgcolor="#ffffff">
<p>
This is a test
<p>
<img border="2" src="[img]">
</body>
</html>
My post_map table is PostGIS:
testdb=# \d post_map
Table "post_map"
Attribute | Type | Modifier
-----------+--------------+----------
lid_01 | character(4) |
lid_02 | character(4) |
lid_03 | character(4) |
shape | geometry |
aa08 | character(1) |
value_08 | integer |
I want the "judger" variable can be assign a value from the go3.html
by users, then tuto4.map filter data with the judger (in
FILTER "value_08 = judger").
Could anyone tell me where I must fix ? Thank you very much.
Whang Yeong Chong
==================================================================
¡e·s®öºô¤½§i¡f
¤Wºô§K¼·±µ¶O! [±b¸¹] sina [±K½X] sina at u2online [¼·±µ¹q¸Ü] 4050-8888¡A
©Î½Ð¦Ühttp://u2.sina.com.tw/sina¤U¸ü¦Û°Ê³]©w³nÅé
More information about the mapserver-users
mailing list