[Mapserver-users] Join Query error

Richard Greenwood rich at greenwoodmap.com
Fri Jul 2 14:43:38 EDT 2004


I'm struggling with a join, type multiple. First off I get:
   loadLayer(): Unknown identifier. Parsing error near (QUERY):(line 428)
(see map file below). If I comment out the QUERY and corresponding END, 
I get rid of the error, but still no data from the joined dbf. The data 
from the base table is displayed, but then "[CATS]" is displayed rather 
than the cat.html template.

Seems like maybe I shouldn't have a CLASS in a layer with a QUERY, but 
removing it doesn't really effect things much.

Can anybody point me to a working example that I could examine?

Thanks,
Rich

=== map file ====

LAYER
   NAME  "ownership"
   STATUS ON
   TYPE POLYGON
   DATA  "ownership"
   HEADER "attribute_header.html"
   FOOTER "attribute_footer.html"
   QUERY
     JOIN
       NAME CATS
       TABLE "/fc/data/cat.dbf"
       FROM DESCRIPTOR
       TO CAPKEY
       TYPE multiple
       TEMPLATE cat.html
     END # of JOIN Object
   END # of query
   CLASS
     Name "Lot and Parcel Lines"
     TEMPLATE "attribute_display.html"
     SYMBOL "Solid"
     OUTLINECOLOR 0 0 0
     SIZE 2
   END  # class		
END  # layer

=== attribute_display.html ====

<li>Name : [NAME]</li>
<li>Mailing Address : [ADDRESS1]</li>
<li>Mailing Address : [ADDRESS2]</li>
<li>Mailing Address : [CITY], [STATE] [ZIPCODE]</li>
<li>Street Address  : [ST_NUM1] [ST_NUM1_2] [ST_DIR_PRE] [ST_NAME] 
[ST_DIR_SUF]</li>
<li>Descript : [DESCRIPT]</li>
<li>Area_tax : [ACRES_TAX]</li>
<li>Area_calc : [AREA]</li>
<li>Code Area : [CODE_AREA]</li><BR>
[CATS]

=== cat.html ===

<li>Category : [Cacat] [Descript]</li>

-- 
Richard Greenwood
www.greenwoodmap.com



More information about the mapserver-users mailing list