[Mapserver-users] JOIN problems

BONNER S KARGER bskarger at students.wisc.edu
Tue Jul 13 14:00:33 EDT 2004


Thanks Zamil, that may have solved one problem. 

This is how the JOIN def looks now:

JOIN
    CONNECTIONTYPE mysql
    CONNECTION "server:user:pass:BYPRODUCTS3"
     NAME "MeatProcJoin"
                 TABLE PRODUCER
                 FROM PRDUCER_ID
                 TO PRODUCER_ID
                 TYPE SINGLE
   END
END


Now, upon clicking a point in query mode, I get a completely BLANK page. NOTHING on the page...blank. No errors, nothing. This doesn't help me much! It would be nice to get some sort of error output. 
Thanks for the help, hopefully someone can take over from here.

Bonner


----- Original Message -----
From: Zamil Murji <Zamil.Murji at divestco.com>
Date: Tuesday, July 13, 2004 12:42 pm
Subject: RE: [Mapserver-users] JOIN problems

> 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
> [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