[Mapserver-users] JOIN problems
Zamil Murji
Zamil.Murji at divestco.com
Tue Jul 13 10:42:01 PDT 2004
I might be wrong, but I think you're missing the obvious. Yuo said that there is a table with a name of "PRODUCER" but in the layer defintion you have the following line:
TABLE waste1
Shouldn't that be TABLE PRODUCER?
I'm not that familiar with JOIN but I think that might be the problem.
Zamil
-----Original Message-----
From: mapserver-users-admin at lists.gis.umn.edu
[mailto:mapserver-users-admin at lists.gis.umn.edu]On Behalf Of BONNER S
KARGER
Sent: Tuesday, July 13, 2004 10:08 AM
To: Mapserver User Group
Subject: [Mapserver-users] JOIN problems
List,
I am trying to use JOIN in my LAYER object to get more attribute info from a MySQL table. I have a point layer shapefile called "waste1" in the data directory. There is a field called PRDUCER_ID. The MySQL table I want to join is in the DB called "BYPRODUCTS3". The table name is "PRODUCER". The field name I want to use as the key in the table is called "PRODUCER_ID".
Browsing the map is no problem, but when I click the query option, then click a point from this layer, I get the following error:
Content-type: text/html msMySQLJoinConnect(): DBASE file error. Item PRDUCER_ID not found in table waste1.
msMySQLQuery(): Query error. Bad mysql query (SELECT count(PRDUCER_ID) FROM waste1)
What is going on? It seems like there is no place in the JOIN object to tell mapserver what db table to use...only which .dbf table to use.
Below is the layer def. from my map file:
LAYER
NAME waste1
TYPE POINT
STATUS ON
DATA waste1
CLASS
NAME "Meat Proc. Residuals"
TEMPLATE "test.html"
COLOR 255 051 000
SYMBOL "circle"
SIZE 8
END
TOLERANCE 5
DUMP TRUE # allow GML export
JOIN
CONNECTIONTYPE mysql
CONNECTION "server:user:pass:BYPRODUCTS3"
NAME "MeatProcJoin"
TABLE waste1
FROM PRODUCER_ID
TO PRDUCER_ID
TYPE SINGLE
END
END
This is mapserver 4.2, on Linux.
Any ideas?
Thanks
Bonner
_______________________________________________
Mapserver-users mailing list
Mapserver-users at lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
More information about the MapServer-users
mailing list