one-to-many join type multiple

Paul Cedfeldt pcedfeldt at crrel.usace.army.mil
Thu Jan 27 13:17:14 PST 2000


Hello,

I've been trying, with only partial success, to get a shapefile
connected to an external dbf with a one-to-many join.  When clicking on
a well on a map, I would like all lab records for that well (contained
in dres010.dbf) to display.  

The join works, but when a well is clicked the template results.html
only shows info for the last matching record from dres010 for that
well.  I imagine this has something to do with the join template
otmjoin.html, which should be processed once for each record according
to the docs, but otmjoin.html is currently empty since I'm not quite
sure what should be in there.

Any ideas or examples would be greatly appreciated....

Thanks,

-Paul 

-------h.map----------------

LAYER
  NAME well
  DESCRIPTION "Wells"
  TYPE point
  STATUS on
  DATA well
  TOLERANCE 5
  QUERY
    TEMPLATE results.html
    JOIN
      NAME labs
      TABLE /free/haines/d_res010.dbf
      FROM holp
      TO d_site_id
      TYPE multiple 
      TEMPLATE otmjoin.html
    END    
  END
END

------results.html---------

<HTML>
<body bgcolor=#FFFFFF>

Result [rn] <b
<p>
<br>Sample Num: [K_SAMPLE]
<br>Site AP Number: [D_SITE_ID]
<br>Lab Sample #: [K_LABSAMPI]
<br>
</HTML>



More information about the MapServer-users mailing list