[Mapserver-users] N/A

Angelo CM supernaut at esfera.cl
Mon Mar 17 20:39:42 EST 2003


Hi, i'm getting the following error when try to 
edit through php the filter
of the layer: 

" Warning: MapServer Error in prep_DB(): Error 
executing POSTGIS DECLARE
(the actual query) statement: 'DECLARE mycursor 
BINARY CURSOR FOR SELECT
nombre_via::text,asbinary(force_collection
(force_2d(the_geom)),'NDR')
OID::text from vias WHERE (fid_tipo_via) and 
(the_geom && setSRID( 
BOX3D(-71.67189575 -33.078516666667,-
71.572328225 -33.004)'::BOX3D
find_srid('','vias','the_geom') ))' 

Postgresql reports the error 'ERROR: left-hand 
side of AND is type 'integer'
not 'boolean' ' " 

This is the Layer: 

LAYER 
CONNECTIONTYPE postgis 
NAME "ejes_calles" 
CONNECTION "user=postgres password=abc123 
dbname=cultursig
host=localhost" 
STATUS ON 
DATA "the_geom from vias" 
TYPE LINE 
UNITS DD 
SIZEUNITS DD 
LABELITEM nombre_via 
LABELCACHE ON 
TOLERANCE 3 
TOLERANCEUNITS PIXELS 
CLASS 
NAME "ejes_calles" 
SYMBOL 0 
COLOR 255 108 83 
SIZE 1 
MINSIZE 1 
MAXSIZE 100 
LABEL 
SIZE SMALL 
COLOR 0 0 0 
ANGLE AUTO 
POSITION AUTO 
END 
END 
END 

And this is the code in PHP: 
$id_tipo=$myrow[2]; 
$map = ms_newMapObj("../mapas/valpo.map"); 
$capa = $map->getlayerbyname("ejes_calles"); 
$capa->setfilter("\"fid_tipo_via\" = 
\"$id_tipo\""); 
$image = $map->draw(); 
$image_url = $image->saveWebImage(MS_PNG,1,1,0); 


Where is the error? I'm using the latest stable 
versions of PHP, PostgreSQL
Mapserver and Postgis. 
Thanks 
-- 
Angelo Cabrera M. 
angelocabrera at vtr.net 
+5692215085 
Ingeniería Civil Informática 
UTFSM 
Valparaíso, Chile





More information about the mapserver-users mailing list