At the time when writing the join functions (3 years ago) PEAR supported 
just very basic functions for dBase. And one had to look in the source 
code of the dBase module to find out which (for me one of the biggest 
disadvantages of quite a lot PEAR modules is a lacking or very poor 
documentation). So I made no efforts to get the joining working with dBase.

Then I understood that Mapserver had the join function working again and 
did not care at all about dBase. I never needed it. If your server is 
running on Windows the easiest and fastest solution for dBase joins 
would be to link it to an MS Access database file and use ODBC to 
connect to that.

I don't understand what you mean with 'But the data array I get contains 
every record of the dbf-file '. In a 1-1 join normally only the first 
record is taken (because of a bug in pm that's also the case for 
1-to-many joins...). If the data you get back contains all records, then 
the PEAR module for dBase seems not to be working properly.

I cannot say anything for Mapserver's own join function and if it works 
with p.mapper, I never used it. Did you add the fields of the joined 
dBase table to the 'METADATA - RESULT_FIELDS' ?

Armin

DJ Broerse wrote:
> Hey Armin
> 
> Already a couple of days I am fighting with joins, at this moment with 
> no luck at all.
> I hope you can help me.
> 
> I have a layer and this layer has to join another dbf-file.
> I know there are two possibilities to join.
> 
> In your documentation you write that it isn't possible to join dbf-files 
> because of the limitations of PEAR.
> Can you explain that? PEAR supports dbase and I can connect to the dbf-file.
> Through Pmapper I query the dbf with
> 
> SELECT AB_GEMTE,AD_PERCNR FROM EIGENAREN WHERE AA_LINKID='PLP00C 02915'
> 
> But the data array I get contains every record of the dbf-file 
> regardless the select query. With a strange first record, probably meta 
> data of the dbf file.
> 
> METADATA
>       "DESCRIPTION" "gbkn-philippine"
>       "RESULT_JOIN" 
> "dbase:////var/www/html/pmapper-dev/gisdata/join/eigenaren.dbf||EIGENAREN at 
> [EMAIL PROTECTED] at AB_GEMTE,AD_PERCNR||WILLEKEUR||0"
>     END  # Metadata
> 
> The other possibility is to join the dbf by MapServer.
> This gives me no results, no errors nothing.
>  JOIN
>      NAME "join1"
>      TABLE "join/eigenaren.dbf"
>      FROM "EIGENAREN.AA_LINKID"
>      TO "GBKN-PHILIPPINE.WILLEKEUR"
>      TYPE ONE-TO-ONE
>  END
> 
> I hope you can help me with this join.
> 
> Dennis-Jan
> 

Reply via email to