[mapserver-users] JOIN in a mapfile from a shapefile to a MySQL database
Minka Stoyanova
minka.stoyanova at gmail.com
Fri Sep 5 09:13:39 PDT 2008
Hello,
It's the first time i try to make a JOIN in a mapfile layer. I want to query
a mysql database for some attributes (columns) of a selected point from the
point layer.
This is the layer definition:
LAYER # States point layer 1 begins here
NAME "meteostations"
DATA meteostationstotal_11
STATUS ON
TYPE POINT
CLASS
SYMBOL 'circle'
SIZE 8
COLOR 255 0 0
OUTLINECOLOR 0 0 0
END
TEMPLATE "sometemplate.html" TOLERANCE 3 TOLERANCEUNITS PIXELS
METADATA
"DESCRIPTION" "Meteo stations"
"RESULT_FIELDS" "A sin_kod NAME IME longi X_COO lat Y_COO"
# the result fields are mixed - the* names of some columns* from the
shapefile and from the database
END
JOIN
NAME FirstJoin
CONNECTION
'MYSQL:meteo,host=some_IP,user=myuser,password=mypassword,tables=bgc'
CONNECTIONTYPE ogr
FROM A
TABLE bgc
TO sin_kod
TYPE ONE-TO-ONE
END
END # States point layer 1 ends here
I receive no error (neighther in the mapserver.log file, nor in the web
server logs) BUT I don't receive any info from the database.
Thanks in advance!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20080905/64c07317/attachment.htm>
More information about the MapServer-users
mailing list