No subject

Giuseppe Molinario g.molinario at GMAIL.COM
Wed Jun 27 01:48:15 PDT 2007


Hi everyone,


Any takers on this problem?

My problem is this: I am using the following layer in a Mapserver based
application. The DATA connection works, objects are visible on the map in
their correct place and symbology, however the query of the postgis table
works only if I name the columns of the LEFT table in the RESULT FIELDS. How
do i get the thing to query also my Columns from the joined table? Why on
earth would i have the same problem usind the DATA connected to a table
view?

here are the three DATA strings and the metadata

DATA "the_geom FROM Tbl_view_map USING UNIQUE oid USING SRID=32633" - works
but no query on the joined fields.

DATA "the_geom FROM (SELECT allevamenti.the_geom2 AS the_geom,
allevamenti.id_desc_ok, allevamenti.oid, allevamenti.cod_azienda,
allevamenti.nome, allevamenti.indirizzo, allevamenti.cap, allevamenti.comune,
allevamenti.specie, allevamenti.numero_capi, decodificaattivita.descr FROM
allevamenti LEFT JOIN decodificaattivita ON allevamenti.id_desc_ok =
decodificaattivita.id_desc_ok WHERE allevamenti.id_desc_ok =
decodificaattivita.id_desc_ok) AS tbl_result_join USING UNIQUE oid USING
SRID=32633"

DATA "the_geom FROM (SELECT allevamenti.the_geom2 AS the_geom,
allevamenti.id_desc_ok, allevamenti.oid, allevamenti.cod_azienda,
allevamenti.nome, allevamenti.indirizzo, allevamenti.cap, allevamenti.comune,
allevamenti.specie, allevamenti.numero_capi, decodificaattivita.descr FROM
allevamenti, decodificaattivita WHERE allevamenti.id_desc_ok =
decodificaattivita.id_desc_ok) AS tbl_result_join USING UNIQUE oid USING
SRID=32633"

        METADATA
            "DESCRIPTION" "Allevamenti"
            "RESULT_FIELDS" "cod_azienda, nome, indirizzo, cap, comune,
specie, numero_cap, (if i ADD "descr" column here the query tools of my app
stop working in all three cases"
            "RESULT_HEADERS" "Codice Azienda, Nome, Indirizzo, CAP, Comune,
Specie Allevata, Numero Capi, Attività Commerciali"
            "LAYER_ENCODING" "UTF-8"
        END  # Metadata

Thanks,

PS. I am using pmapper


Giuseppe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20070627/db050c72/attachment.htm>


More information about the MapServer-users mailing list