[mapserver-users] join - my neverending story
Mike Elstermann
Mike Elstermann" <mike.elstermann@halle.de
Tue, 5 Mar 2002 14:07:38 +0100
This is a multi-part message in MIME format.
------=_NextPart_000_001A_01C1C44F.1B347E10
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
thanks, baut how can I display the items from the joined dbf?
my problem:
1.) i have a shapfile called "test1" with an item "nr" in the dir: =
/mapserver/data
2.) i have also a dbf called "join1.dbf" in the dir: =
"c:\inetpub\wwwroot\mapserver\data\join1.dbf" also with an item "nr" and =
"wert1" and "test2"
3.) my map-file:
LAYER
NAME test
TYPE POLYGON
STATUS DEFAULT
DATA test1
LABELITEM NR
CLASS
SYMBOL 0
COLOR 255 0 0
OUTLINECOLOR 0 0 0
TEMPLATE "joinx.html"
JOIN
NAME jj
table "c:\inetpub\wwwroot\mapserver\data\join1.dbf"
from nr
to nr
type single
END # join
LABEL
COLOR 128 0 0
ANTIALIAS TRUE
SIZE tiny
END
END
HEADER "joinx_header.html"
FOOTER "joinx_footer.html"
END
4.) the templates
a) "joinx_header.html"
<font size+1><b>Layer: TEST</b></font><p>
<table cellpadding=3D5 cellspacing=3D2 border=3D0>
<tr bgcolor=3D#CCCCCC>
<th>NR</th><th>WERT1</th><th>TEXT2</th>
</tr>
b) "joinx_footer.html"
</table><p>
c) "joinx.html
<tr>
<td>[NR]</td>
<td>[WERT1]</td>
<td>[TEXT2]</td>
</tr>
but my query give me only this:
Layer: TEST=20
NR WERT1 TEXT2=20
5 [WERT1] [TEXT2]=20
:-( - where is the mistake? where are the value for "wert1" and =
"text2"??
greetings mikeE.
------=_NextPart_000_001A_01C1C44F.1B347E10
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=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2600.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>
<DIV><FONT face=3DArial size=3D2>thanks, baut how can I display the =
items from the=20
joined dbf?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>my problem:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>1.) i have a shapfile called "test1" =
with an item=20
"nr" in the dir: /mapserver/data</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>2.) i have also a dbf called =
"join1.dbf" in the=20
dir: "c:\inetpub\wwwroot\mapserver\data\join1.dbf" also with an item =
"nr" and=20
"wert1" and "test2"</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>3.) my map-file:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>LAYER<BR> NAME =
test<BR> =20
TYPE POLYGON<BR> STATUS DEFAULT<BR> DATA=20
test1<BR> LABELITEM NR<BR> =20
CLASS<BR> SYMBOL 0<BR> =
COLOR 255=20
0 0<BR> OUTLINECOLOR 0 0 =
0<BR> =20
TEMPLATE "joinx.html"<BR> =20
JOIN<BR> NAME=20
jj<BR> table=20
"c:\inetpub\wwwroot\mapserver\data\join1.dbf"<BR> =
=20
from nr<BR> to=20
nr<BR> type=20
single<BR> END # =
join<BR> =20
LABEL<BR> COLOR 128 0=20
0<BR> ANTIALIAS=20
TRUE<BR> SIZE=20
tiny<BR> END<BR> END<BR> =20
HEADER "joinx_header.html"<BR> FOOTER=20
"joinx_footer.html"</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>END<BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>4.) the templates</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>a) "joinx_header.html"<BR></FONT><FONT =
face=3DArial=20
size=3D2><font size+1><b>Layer:=20
TEST</b></font><p><BR><table cellpadding=3D5 =
cellspacing=3D2=20
border=3D0><BR><tr=20
bgcolor=3D#CCCCCC><BR><th>NR</th><th>WERT1</th>=
;<th>TEXT2</th><BR></tr></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>b) "joinx_footer.html"</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></table><p></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>c) "joinx.html</FONT></DIV>
<DIV><FONT face=3DArial=20
size=3D2><tr><BR><td>[NR]</td><BR><td>[WERT1]<=
/td><BR><td>[TEXT2]</td><BR></tr><BR></DIV>
<DIV>but my query give me only this:</DIV>
<DIV><STRONG>Layer: TEST</STRONG> </DIV>
<P>
<TABLE cellSpacing=3D2 cellPadding=3D5 border=3D0>
<TBODY>
<TR bgColor=3D#cccccc>
<TH>NR</TH>
<TH>WERT1</TH>
<TH>TEXT2</TH></TR>
<TR>
<TD>5</TD>
<TD>[WERT1]</TD>
<TD>[TEXT2]</TD></TR></TBODY></TABLE></P>
<DIV><STRONG>:-( - where is the mistake? where are the value for "wert1" =
and=20
"text2"??</STRONG></DIV>
<DIV><STRONG></STRONG> </DIV>
<DIV><STRONG>greetings mikeE.</STRONG></DIV>
<DIV><BR></FONT></FONT><FONT face=3DArial=20
size=3D2></FONT> </DIV></DIV></BODY></HTML>
------=_NextPart_000_001A_01C1C44F.1B347E10--