Hi List, <br><br>This
looks familiar to me but it's eluding my brain right now as to why.
Mapserver / Postgis is generating an invalid SQL when trying to do an
itemquery a layer. <br><br>Here's the error from mapserv cgi <br>
<br>
msPostGISLayerWhichShapes(): Query error. Error (ERROR: argument of AND
must be type boolean, not type integer
LINE 1: ...29.8659509))',find_srid('',<div id=":xs">'parcel','the_geom')) and (50105)
^
) executing query: select
"id","transid","qpid","gis_acres","lastmodified",encode(ST_AsBinary(ST_Force_2D("the_geom"),'NDR'),'hex')
as geom,"id" from (select * from parcel) as foo where the_geom
&& GeomFromText('POLYGON((382577.69492276
1555529.8659509,382577.69492276 1851596.8951139,832467.25879056
1851596.8951139,832467.25879056 1555529.8659509,382577.69492276
1555529.8659509))',find_srid('','parcel','the_geom')) and (50105)
<br><br>Notice the end of the sql it is missing (qpid = 50105) qpid being set as qitem is that not supposed to be there :)<br><br>Any assistance would be greatly appreciated :)<br><br>Paul<br><br>Here's the layer and versions ----<br>
<br>CGI params of interest: &mode=itemquery&qitem=qpid&qstring=50105&qformat=parcel_as_html&qlayer=qparcel<br><br>Here's the layer:<br>--><br> LAYER<br> NAME 'qparcel'<br> <br> INCLUDE 'projection.inc'<br>
INCLUDE 'dbconnection.inc'<br> DATA 'the_geom from (select * from parcel) as foo using unique id' <br> <br> TYPE POLYGON<br> STATUS OFF<br> METADATA<br> qstring_validation_pattern '.' # should set this to a regex specific for this county<br>
END<br> CLASS<br> NAME 'Selected Parcel'<br> OUTLINECOLOR 255 0 0<br> SYMBOL "circle"<br> SIZE 3<br> LABEL<br> COLOR 0 0 0<br> SIZE SMALL<br> MINDISTANCE 100<br>
END<br> END<br> TEMPLATE 'void'<br><br> END<br>----><br><br>Postgis ver:<br>"POSTGIS="1.5.3" GEOS="3.3.1-CAPI-1.7.1" PROJ="Rel. 4.7.1, 23 September 2009" LIBXML="2.7.6" USE_STATS"<br>
<br>MapServer ver:<br>MapServer version 6.0.1 OUTPUT=GIF OUTPUT=PNG
OUTPUT=JPEG OUTPUT=KML SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=CAIRO
SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT
SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER
SUPPORTS=THREADS SUPPORTS=GEOS INPUT=POSTGIS INPUT=OGR INPUT=GDAL
INPUT=SHAPEFILE</div>