[mapserver-users] queryByAttributes on PostGIS-Layer
schroeter at netgis.de
schroeter at netgis.de
Wed May 28 03:48:26 PDT 2008
Hallo list,
My test-system: Mapserver 5.02 on WinXP and postgreSQL 8.2
I try to make some querys via php-mapscript for a postgis-layer:
queryByPoint,queryByShape and queryByRect is no problem.
queryByAttributes always return "no result" (field 'nr_' is an integer)
If I use a shapefile for the same data (biogasanlagen.shp) queryByAttributes
works fine.
mapfile:
...
LAYER
NAME "biogasanlagen"
TYPE point
STATUS on
CONNECTIONTYPE postgis
CONNECTION "user=postgres password=xyz dbname=mydb host=localhost
port=5432"
DATA "the_geom from biogasanlagen using unique gid"
#DATA biogasanlagen.shp
TEMPLATE void
CLASS
Name "biogasanlagen"
OUTLINECOLOR 128 70 0
COLOR 230 70 0
SYMBOL 'circle'
SIZE 12
END # CLASS
TRANSPARENCY 88
TOLERANCE 8
END
...
php-Code:
...
$layer = $map->getLayerByName("biogasanlagen");
@$myQuery = $layer->queryByAttributes('nr_','7', MS_SINGLE);
...
any idea?
Thanks Sven
More information about the MapServer-users
mailing list