Carlo,

if you get the error
"Relation Anagrafica_Punti_Prelievo does not exist"
then the table is definitively not existing. Postgres supports this kind 
of query for sure. But PG has sort of strange behaviour when using upper 
case characters for tables or columns. Try converting everything in 
lower case and run it again.

I checked the code and for 1-to-1 relations it works without problems. 
For 1-to-many there is a slight problem that would need some 
re-structuring of the code. The data are displayed, but just everything 
in one row. In your case you do not get a query result (which would be 
an array) but either an error object or error code (what you can print 
out, eg. with "print_r($data);" in line 216.

In general it's always a bit difficult to find errors without having the 
data and the map file available. I even do not know the version or build 
of pmapper you are using.

Armin



carlo.calvino at email.it wrote:
> Dear Armin,
> I looked inside string $sqlRun, its value is "SELECT PPID,PPNom,GEOID FROM
> Anagrafica_Punti_Prelievo WHERE GEOID=1884".
> I passed this code into Postgresql 8.0 and it says:" Relation
> Anagrafica_Punti_Prelievo does not exist". This type of sql code doesn't
> seem to be supported by Postgresql 8. So, I moved the table into an Access
> database, updating the map file with:
> 
> RESULT_JOIN
> "odbc://'':''/localhost at prova||Anagrafica_Punti_Prelievo at [EMAIL 
> PROTECTED] at PPID,PPNom||GEOID||0"
> 
> It does work! But the query doesn't show the two cells with the name of the
> joined fields. 
> Moreover, if I join to a table with a 1-to-many relation, I get the same
> error:
> 
> "Cannot Use a scalar value as an array in squery.php on line 221". 
> 
> This type of relation is important for me, and I think it is what ArcView
> calls "Relate". Thank you very much for your help.
> 
> 
> ----- Original Message ----- 
> From: "Armin Burger" <armin.burger at gmx.net>
> To: <carlo.calvino at email.it>
> Cc: <pmapper-users at faunalia.it>
> Sent: Wednesday, January 18, 2006 3:30 PM
> Subject: Re: [Pmapper-users] Problems with JOIN
> 
> 
>> Try to write out the SQL string that is sent to the DB, something like
> after
>> line 292
>>
>> error_log($sqlRun);
>>
>> and see in the PHP error log for the command, then run it dircetly on the
>> database and see if the command executes without erors.
>>
>> if yes, write out the result ($data) from the query after line 211; you
> can
>> use the printDebug() function from common.php, just modify the path of the
>> debug file.
>>
>> I have to admit that i haven't used the join function since about 2 years,
>> but the code should not have changed since and it had been working. 
>>
>> Armin
>  
>  --
>  Email.it, the professional e-mail, gratis per te: http://www.email.it/f
>  
>  Sponsor:
>  Suonerie polifoniche, loghi, sfondi colorati, giochi multimediali, ecco
> tutto quello che trovi nella sezione email.it dedicata ai cellulari
>  Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=3116&d=20060119
> 
> 
> 
> _______________________________________________
> Pmapper-users mailing list
> Pmapper-users at faunalia.it
> http://faunalia.it/cgi-bin/mailman/listinfo/pmapper-users
> 
> 

Reply via email to