Armin,

Hi again,

I have managed to do something that works at this moment. I would like to share 
it  with you so you can tell me what you think about it.

I have modified the printFields function of squery.php like following:

1. I have realised you were using $loop=2. I don't know exactly why you used 
the number 2 since you never increased/decreased its value, only set to 
zero...but...

2. I have used this to modify the first part setting:

if (!$this->one2many) {
        $dbloop = $dbresCount;
} else {
        $loop = 1;
}

instead of just:

if (!$this->one2many) {
        $dbloop = $dbresCount;
}

2. Then I modified/added:

...
        while($loop > 0) {

            ##$this->qStr .= "pippo anzahl felder:" . sizeof($this->selFields);
            // Add shape index to array, used for highlight
            //$resultindexes[] = $qShpIdx;
                if ($loop == 1) {
                        $this->qStr .= "], [";
                        $this->qStr .= ($this->qLayerType != 3 ? 
$this->printShapeField($qShape) : "\"r\""); 
                }
            // Print all OTHER COLUMNS from SHAPE
...

That's it. Not ideal, but ok for me at this moment. I have to see how can I 
support it in attribute query...

regards, dejan



> -----Original Message-----
> From: Gambin Dejan 
> Sent: Friday, November 24, 2006 10:06 AM
> To: '[email protected]'
> Subject: RE: [pmapper-users] Oracle connection - advice needed
> 
> nquery works as you said, that was my mistake of not 
> selecting the correct layer after clicking on "Select" button :-((
> 
> Since I am not familiar with json and javascript generally, 
> do you think I could do something in squery.php, specifically 
> in printFields function by creating a qStr for each row of  
> "many" data similar to qStr for any other row created by 
> printResultRow? I hope you understand what I mean :-))
> 
> regards, dejan
> 
> > -----Original Message-----
> > From: Armin Burger [mailto:[EMAIL PROTECTED]
> > Sent: Friday, November 24, 2006 9:39 AM
> > To: Gambin Dejan; [email protected]
> > Subject: Re: [pmapper-users] Oracle connection - advice needed
> > 
> > 
> > > Well, it is working for me but let me explain:
> > > 
> > > I have a polygon shape presenting buildings. There is a
> > building ID in
> > > the dbf file. Oracle database has a table of locations
> > inside the buildings.
> > > This table has also a building ID and it holds many locations 
> > > attributes (area, volume, user, purpose, etc.). I have 
> tried using 
> > > one-to-many query in pmapper by joining tha shapefile with
> > locations
> > > table. And it works..(by identify query). I get for example
> > the "area" 
> > > for each location inside the building. The problem is 
> that pmapper 
> > > incorrectly displays all the attributes for one building in
> > one row instead of breaking the row for each location.
> > > But this can be solved I think.
> > > 
> > 
> > This is what I meant that 'it's not working'. The result 
> array for one 
> > feature contains too many attributes. Ok, you could try in 
> pmjson.js 
> > for the result display to check for this and add an 
> additional row if 
> > the array of the result feature is longer than the one for 
> the header. 
> > The problem is that with the current result structure in the json 
> > string all results from the join are in the same array, you do not 
> > know
> > when one ends and the next starts.   
> > 
> > In any case you will have to decide how to display such a result. 
> > Having one building eg. appearing multiple times with all 
> the common 
> > attributes and the zoom button, just because of additional 
> attributes, 
> > might not look very intuitive and logical to users and one might at 
> > first glance see them as separate buildings.
> > 
> > 
> > > So now I am confused about what you said. I really need 
> to do this 
> > > type of join and I will gladly contribute to make it working 
> > > correctly. For now I am planning to solve the "one row" 
> displaying 
> > > problem and maybe support nquery (it is not working of
> > course). Also,
> > > I didn't try with attribute query yet.
> > > 
> > 
> > I wonder why nquery or search should not work, they should be 
> > identical for the display as normal query.
> > 
> > armin
> > --
> > Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
> > Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
> > 
> 

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
pmapper-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pmapper-users

Reply via email to