Postgis nquery returns the same result multiple times

James Martin martin426 at YAHOO.COM
Wed Nov 17 12:26:47 EST 2004


Hello,

I'm trying to perform a nquery on a postgis layer and am recieving a weird
result.  If my DATA = "the_geom from place" the query works fine.  However,
when trying:

DATA = "the_geom from
(SELECT place.the_geom AS the_geom,
             place.gid AS gid,
             place.name AS name
             FROM place
             WHERE place.gid=9)
             AS foo USING UNIQUE place.gid
             USING SRID=-1"

And then bound a point with &imgbox the query returns the correct record,
but returns it 'N' times, where N is the number of rows in the table.  The
map itself shows only the one point specified in the WHERE clause. If I
remove the WHERE clause so I can see the other points and bound two of them,
the query returns the first record 2 * N times.

If I do just a query with &imgxy it returns just the one result.

Any help is greatly appreciated!

-James



More information about the mapserver-users mailing list