<DIV>Hi everybody,</DIV>  <DIV> </DIV>  <DIV>I'm working with some post-disaster management support tool with mapping forcusing on Tsunami Rehabilation.</DIV>  <DIV> </DIV>  <DIV>I have managed to use postGIS / UMN mapserver for basic stuff like select data from different tables , join them and dislaying information according to predefined selections.</DIV>  <DIV> </DIV>  <DIV>Now I want to add a very simple serching facility. For an example if user already knows the name of an affected village name,by selecting the name ( from a drop down menu), the area should be highlighed on the map.</DIV>  <DIV> </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> </DIV>  <DIV>DATA "the_geom from (select alldsdivisions.the_geom as the_geom from alldsdivisions where alldsdivisions.dsd_n ='%qstring%')<BR>   AS
 selectedgs<BR>   USING UNIQUE oid USING SRID=-1"</DIV>  <DIV> </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> </DIV>  <DIV>i get following error message</DIV>  <DIV> </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 && 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> </DIV> 
 <DIV>I can't figureout how to handle this. </DIV>  <DIV>any help is highly appriciated.</DIV>  <DIV> </DIV>  <DIV> </DIV>  <DIV>thanking in advance.</DIV>  <DIV> </DIV>  <DIV>nimalika</DIV>  <DIV>( from Sri Lanka-island in indian ocean)</DIV>  <DIV> </DIV>  <DIV> </DIV>  <DIV> </DIV><p>

<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.