No subject

Umberto Nicoletti umberto.nicoletti at GMAIL.COM
Wed Jun 27 04:56:26 EDT 2007


Giuseppe,
try creating a view based on the joined tables.

HTH,
Umberto

On 6/27/07, Giuseppe Molinario <g.molinario at gmail.com> wrote:
> 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
>
>



More information about the mapserver-users mailing list