[Mapserver-users] querybyattributes with Postgres/Postgis Layer

Damian Schroder map_surfer at yahoo.com
Sat Nov 29 11:41:48 EST 2003


--0-1435250590-1070124108=:89418
Content-Type: text/plain; charset=us-ascii

try using a filter instead of querybyattributes.

Nicol Hermann <mapserver at geochem.de> wrote:Dear List,

i trying to do a querybyattributes Query with a Postgres/Postgis layer
and get the following error:

Warning: [MapServer Error]: prep_DB(): Error executing POSTGIS DECLARE
(the actual query) statement: 'DECLARE mycursor BINARY CURSOR FOR SELECT
plzort01::text,asbinary(force_collection(force_2d(the_geom)),'NDR'),OID::text from plz_gebiete WHERE (Mutterstadt) and (the_geom && setSRID( 'BOX3D(5.865627 46.57242768,15.039879 55.75900832)'::BOX3D,find_srid('','plz_gebiete','the_geom') ))'

here is the relevant part of my code:

$layer = $Map ->getLayerbyname("Regionen");
$layer -> set("status", MS_ON );
$status = $layer->querybyattributes("plzort01", "Mutterstadt",
MS_MULTIPLE);

It seems that the 'qitem' (plzort01) won't be evaluated because it is
not present in the SQL statement.
I also tried the qitem with upper case. The same error appears.

The debugging message on my shell says: 
ERROR: Attribute "mutterstadt" not found

My Postgis Version is: Mappostgis.c - version of June 12/2003. 
and i`am using Mapserver 4.0.1 on a Linux box.

Does anybody know how I can solve this problem?
Many thanks
Nicol


-- 
Nicol Hermann 

_______________________________________________
Mapserver-users mailing list
Mapserver-users at lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users


---------------------------------
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
--0-1435250590-1070124108=:89418
Content-Type: text/html; charset=us-ascii

<DIV>try using&nbsp;a filter instead of querybyattributes.<BR><BR><B><I>Nicol Hermann &lt;mapserver at geochem.de&gt;</I></B> wrote:
<BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">Dear List,<BR><BR>i trying to do a querybyattributes Query with a Postgres/Postgis layer<BR>and get the following error:<BR><BR>Warning: [MapServer Error]: prep_DB(): Error executing POSTGIS DECLARE<BR>(the actual query) statement: 'DECLARE mycursor BINARY CURSOR FOR SELECT<BR>plzort01::text,asbinary(force_collection(force_2d(the_geom)),'NDR'),OID::text from plz_gebiete WHERE (Mutterstadt) and (the_geom &amp;&amp; setSRID( 'BOX3D(5.865627 46.57242768,15.039879 55.75900832)'::BOX3D,find_srid('','plz_gebiete','the_geom') ))'<BR><BR>here is the relevant part of my code:<BR><BR>$layer = $Map -&gt;getLayerbyname("Regionen");<BR>$layer -&gt; set("status", MS_ON );<BR>$status = $layer-&gt;querybyattributes("plzort01", "Mutterstadt",<BR>MS_MULTIPLE);<BR><BR>It seems that the 'qitem' (plzort01) won't be evaluated because it is<BR>not present in the SQL statement.<BR>I also tried the qitem with
 upper case. The same error appears.<BR><BR>The debugging message on my shell says: <BR>ERROR: Attribute "mutterstadt" not found<BR><BR>My Postgis Version is: Mappostgis.c - version of June 12/2003. <BR>and i`am using Mapserver 4.0.1 on a Linux box.<BR><BR>Does anybody know how I can solve this problem?<BR>Many thanks<BR>Nicol<BR><BR><BR>-- <BR>Nicol Hermann <MAPSERVER at GEOCHEM.DE><BR><BR>_______________________________________________<BR>Mapserver-users mailing list<BR>Mapserver-users at lists.gis.umn.edu<BR>http://lists.gis.umn.edu/mailman/listinfo/mapserver-users</BLOCKQUOTE></DIV><p><hr SIZE=1>
Do you Yahoo!?<br>
<a href="http://us.rd.yahoo.com/slv/mailtag/*http://companion.yahoo.com/">Free Pop-Up Blocker - Get it now</a>
--0-1435250590-1070124108=:89418--



More information about the mapserver-users mailing list