ciao Luca,
the query in p.mapper does not consider any headers or footers. If it's just 
for joining DB data to a layer and if the relation is 1-to-1 you can also use 
the join function in p.mapper for it. It requires the PEAR DB package to be 
installed.

See the documentation for the Join definition. There is also a Wiki entry I  
think.

Should be something like

"RESULT_JOIN" "mysql://username:password at hostname/database||lakespy2 at 
[EMAIL PROTECTED] at field1,field2,field3||SHAPE_join_field||0"

under METADATA

and the 'field1,field2,field3' has to be added to the METADATA "RESULT_FIELDS".

Maybe the join via the 'normal' functionality is also working when you add the 
fields just into "RESULT_FIELDS", I've never tried that.

armin


-------- Original-Nachricht --------
Datum: Tue, 18 Jul 2006 15:45:22 +0200
Von: luca marletta <lucamarle at gmail.com>
An: pmapper-users at faunalia.it
Betreff: [Pmapper-users] JOIN datasource

> Ciao Armin,
> I'm trying to connect some table in MySQL to shape using JOIN as this
> example
> 
>  LAYER
>   NAME lakespy2
>   TYPE POLYGON
>   STATUS ON
>   DATA lakespy2
>   CLASS
>     NAME 'Lakes & Rivers'
>     TEMPLATE "lakespy2.html"
>     COLOR 49 117 185
>   END
> 
>   HEADER "lakespy2_header.html"
>   FOOTER "lakespy2_footer.html"
> 
>   JOIN
>    CONNECTIONTYPE mysql
>    CONNECTION "hostname:username:password:database"
>    TABLE "lakespy2"
>    TO "id"
>    NAME "lakejoin"
>    FROM "ID"
>   END
>  END # lakes
> 
> How can I manage the HEADER and FOOTER option in pmapper?
> do you think is it possible to do it?
> 
> Actually I need it because I have some information on MySQL to join
> and I cannot migrate them because part of another db that is update
> everyday.
> 
> The example above, if works correctly is perfect for me but I've no
> idea how can I manage it in pmapper.
> 
> could you give me a suggestion?
> 
> luca
> 
> -- 
> luca marletta
> 
> _______________________________________________
> Pmapper-users mailing list
> Pmapper-users at faunalia.it
> http://faunalia.it/cgi-bin/mailman/listinfo/pmapper-users

-- 


Echte DSL-Flatrate dauerhaft f?r 0,- Euro*!
"Feel free" mit GMX DSL! http://www.gmx.net/de/go/dsl

Reply via email to