On 30/09/2008 18:23, Ivan Mincik wrote:
> I am experimenting with joining database table from MS SQL to PostGIS layer. 
> I have working setup of PEAR DB and MDB2. I am using currently MDB2
> 
> In mapfile there is "RESULT_JOIN" "mssql://user:[EMAIL 
> PROTECTED]/testgis||[EMAIL PROTECTED]@[EMAIL PROTECTED],Level||gid||0" . 
> Lines RESULT_FIELDS and 
> RESULT_HEADERS are removed to see all attribute columns with original FIELD 
> NAME from identify.
> 

I guess you need to define RESULT_FIELDS, otherwise it takes the default 
fields from via Mapscript, and the join is just defined in p.mapper, not 
available in pure Mapscript.

Anyway, 'search' (queryByAttributes) will not have join fields for 
Postgis layers. This is using generic PHP/PG functions instead of 
Mapscript because Mapscript queries for Postgis layers seem still to be 
a bit buggy. And my thinking was that if one uses Postgis one can as 
well use generic Postgres functions for joins...

Armin

> Join is working, but when I try identify I get table with NO field name for 
> joined fields. See: http://www.gista.sk/dl/bugs/pmapper/pmapper_join.png
> 
> So I added line error_log($fldName . " : " . $fldValue); to function 
> printFieldValues in incphp/query/query.php and in log there is:
> 
> [30-Sep-2008 14:27:32]
> [30-Sep-2008 14:27:35] gid : 2319
> [30-Sep-2008 14:27:35] por_c : 0
> [30-Sep-2008 14:27:35] plocha : 21372.6
> [30-Sep-2008 14:27:35] druh_zelene_string : nespracovaný záznam
> [30-Sep-2008 14:27:35] pokosene : f
> [30-Sep-2008 14:27:35] m_cast : 0
> [30-Sep-2008 14:27:35] ulica : nespracovaný záznam
> [30-Sep-2008 14:27:35] druh_zelene : 0
> [30-Sep-2008 14:27:35] vlastnik : nespracovaný záznam
> [30-Sep-2008 14:27:35] poznamka : nespracovaný záznam
> [30-Sep-2008 14:27:35] ID : 2319
> [30-Sep-2008 14:27:35] Level : 0
> 
> Joined fields "ID" and "Level" are there ! So why I don't see them in result 
> table ?
> 
> Thanks


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users

Reply via email to