<DIV>Hi everybody,</DIV>  <DIV>&nbsp;</DIV>  <DIV>I'm working with some post-disaster management support tool with mapping forcusing on Tsunami Rehabilation.</DIV>  <DIV>&nbsp;</DIV>  <DIV>I have managed to use postGIS / UMN mapserver&nbsp;for basic stuff like select data from different tables , join them and dislaying information&nbsp;according to predefined selections.</DIV>  <DIV>&nbsp;</DIV>  <DIV>Now I want to add a very simple serching facility. For an example if user already knows&nbsp;the name of an&nbsp;affected village&nbsp;name,by selecting the name (&nbsp;from&nbsp;a drop down menu), the area should be highlighed on the map.</DIV>  <DIV>&nbsp;</DIV>  <DIV>I tried to pass user selection as a variable to postGIS query but I failed.</DIV>  <DIV>code segment is as follows</DIV>  <DIV>&nbsp;</DIV>  <DIV>DATA "the_geom from (select alldsdivisions.the_geom as the_geom from alldsdivisions where alldsdivisions.dsd_n ='%qstring%')<BR>&nbsp;&nbsp; AS
 selectedgs<BR>&nbsp;&nbsp; USING UNIQUE oid USING SRID=-1"</DIV>  <DIV>&nbsp;</DIV>  <DIV>qstring is the variable name use in HTML file.It is replaced by user selection dynamically.</DIV>  <DIV>alldsdivisions is the relation name and dsd_n is the column name of village names.</DIV>  <DIV>&nbsp;</DIV>  <DIV>i get following error message</DIV>  <DIV>&nbsp;</DIV>  <DIV>prepare_database(): Query error. Error executing POSTGIS DECLARE (the actual query) statement: 'DECLARE mycursor BINARY CURSOR FOR SELECT dsd_n::text,asbinary(force_collection(force_2d(the_geom)),'NDR'),oid::text from (select alldsdivisions.the_geom as the_geom from alldsdivisions where alldsdivisions.dsd_n ='Ambalantota') AS selectedgs WHERE (Ambalantota) and (the_geom &amp;&amp; setSRID( 'BOX3D(181659.373889 74242.41425975,303213.047119 165407.66918225)'::BOX3D,-1) )' <BR><BR>Postgresql reports the error as 'ERROR: column "dsd_n" does not exist '<BR><BR>but dsd_n column do exist .</DIV>  <DIV>&nbsp;</DIV> 
 <DIV>I can't figureout how to handle this. </DIV>  <DIV>any help is highly appriciated.</DIV>  <DIV>&nbsp;</DIV>  <DIV>&nbsp;</DIV>  <DIV>thanking in advance.</DIV>  <DIV>&nbsp;</DIV>  <DIV>nimalika</DIV>  <DIV>( from Sri Lanka-island in indian ocean)</DIV>  <DIV>&nbsp;</DIV>  <DIV>&nbsp;</DIV>  <DIV>&nbsp;</DIV><p>&#32;

<hr size=1>Finding fabulous fares is fun.<br><a href="http://farechase.yahoo.com/promo-generic-14795097;_ylc=X3oDMTFtNW45amVpBF9TAzk3NDA3NTg5BF9zAzI3MTk0ODEEcG9zAzEEc2VjA21haWx0YWdsaW5lBHNsawNxMS0wNw--
">Let Yahoo! FareChase search your favorite travel sites</a> to find flight and hotel bargains.