1. Create a database view that joins the two tables and set your DATA variable to that view.
OR
2. Modify the DATA variable to include a JOIN statement.
Aaron
On 6/19/06, Luis Treviño Huerta <[EMAIL PROTECTED]> wrote:
Hi list:
I'm currenttly using a point layer that displays some GPS points that are
stored on a postgis table called "loca". I'd like to label this points with
data that comes from another table in the same postgis data base (this table
is named "autos"), both tables share a common column named "idunit" and I
would like to use autos.idunit as a label. How can I do this?. This is part
of my map file:
LAYER
NAME gis
STATUS ON
TYPE POINT
UNITS METERS
DEBUG ON
CONNECTION "user=XXX password=XXXXX dbname=bsiubica host=XXX.XXX.XXX.XX
port=5432"
CONNECTIONTYPE postgis
DATA "posicion from loca as foo using unique cmpoid using srid=4326"
PROJECTION
"proj=longlat"
"ellps=WGS84"
"datum=WGS84"
END
FILTER 'idunit = %unid%'
CLASS
_expression_ ('[mo]' = '1')
COLOR 255 255 26 #amarillo
SYMBOL 7
SIZE 13
END
END
regards,
Luis
--
+--------------------------------------------
| Aaron Koning
| Information Technologist
| Prince George, BC, Canada.
+--------------------------------------------
| http://datashare.gis.unbc.ca/fist/
| http://datashare.gis.unbc.ca/gctp-js/
+--------------------------------------------
