cgi mapserver query

Greg Luker gluker at SCU.EDU.AU
Wed Aug 23 00:14:23 EDT 2006


Hi Mapserver-Users,

I asked this question a week ago, but I have received no replies, so I'll
ask again:

I'm using cgi mapserver 4.8.3 (beginner) and I'm trying to do a "relational"
query on a MySQL database. I have displayed points from a table using the
inline
CONNECTION '<OGRVRTDataSource... <SrcSQL>SELECT... command in the .map file,
and I can do a simple query on these points (eg display x, y, id, etc),
but now I want to display all related records from another table.
eg I have a Sites table and a Facilities table in MySQL. The Sites table
contains x,y locations of camping grounds. The Facilities table contains
facilities at each campsite (eg showers, cooking, shelter, etc). I can
display Sites as points
on a map, but how do I get a list of all Facilities at each Site? Do I use a
JOIN statement? If so, how?
I have tried a few different things, but I can't make it work.

Any help or pointers to where I might find help would be greatly appeciated!

Thanks,
Greg Luker.



More information about the mapserver-users mailing list