<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">thank you Lucian</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">I've applied the patch you suggest here below on the CVS.</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">can somebody with an active postgis connection try it please?</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">ciao</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Lorenzo</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><BR><DIV><DIV>On 28/nov/06, at 17:07, Lucian Bancescu wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite">  I stepped into this problem too, and it appears that it's a problem with mapserver processing escape chars. Although it's a known bug and although the guys from mapserver are claiming that they committed the changes into the cvs it seems that <BR> somewhere in queryByAttributes, $searchstring gets screwed. So the hack is to double escape the searchstring (this in case you really want to recompile mapserver... and you don't ;)<BR> Insert this code after line 142<BR> <TT><BR>     //PRINTING STUFF</TT><BR> <TT><BR>     if($oLayer-&gt;connectiontype == MS_POSTGIS){<BR> <BR>         $searchstring = "\"".$szSearchfield."~* '".$searchstring."'\"";<BR> <BR>     }else{<BR>         <BR>         $searchstring = "/" . $searchstring . "/i";//case insensitive<BR>     <BR>     }</TT><BR> <BR> Hope it helps<BR> <BR> <BR> Lorenzo Becchi wrote: <BLOCKQUOTE cite="midEB69229B-3A86-4552-81DD-D1F3D288702B@ominiverdi.com" type="cite">  <DIV>Hi Parwaiz,</DIV>  <BR>  <DIV>  <BLOCKQUOTE type="cite">    <DIV> </DIV>    <DIV> How search system in ka-map works with PostGIS? I tried but failed to get  <BR> any result. With shapefile it is working fine.<BR>    </DIV>  </BLOCKQUOTE>  <DIV><BR class="khtml-block-placeholder">  </DIV>  <DIV>Only shapefile part has been properly developed. The PG connection should be adjusted.</DIV>  <DIV>At the moment I've never needed a search system to PG passing from Mapserver. But it could be useful.</DIV>  <DIV><BR class="khtml-block-placeholder">  </DIV>  <DIV>on </DIV>  <DIV>tools/search/kaSearch.php</DIV>  <DIV>there's no implementation to catch the PostgreSQL connection.</DIV>  <DIV>On old code of Paul (xsearch,php) you can find:</DIV>  <DIV>-------------------------------------------------------------------</DIV>  <DIV style="margin: 0px;"><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">if($oLayer-&gt;connectiontype == MS_POSTGIS){</SPAN></FONT></DIV>  <DIV style="margin: 0px; font-family: Monaco; font-style: normal; font-variant: normal; font-weight: normal; font-size: 11px; line-height: normal; font-size-adjust: none; font-stretch: normal; min-height: 15px;"><BR>  </DIV>  <DIV style="margin: 0px;"><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">     </SPAN></FONT><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">$searchstring = $szSearchfield . ' ~* \'' . $searchstring .'\'</SPAN></FONT><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">  </SPAN></FONT><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">';</SPAN></FONT></DIV>  <DIV style="margin: 0px; font-family: Monaco; font-style: normal; font-variant: normal; font-weight: normal; font-size: 11px; line-height: normal; font-size-adjust: none; font-stretch: normal; min-height: 15px;"><BR>  </DIV>  <DIV style="margin: 0px;"><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">} else {</SPAN></FONT><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">  </SPAN></FONT><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">// Shapefile</SPAN></FONT></DIV>  <DIV>...</DIV>  <DIV>}</DIV>  <DIV>-------------------------------------------------------------------</DIV>  <DIV><BR class="khtml-block-placeholder">  </DIV>  <DIV>If you have time to test and debug your contribution will be appreciated.</DIV>  <DIV><BR class="khtml-block-placeholder">  </DIV>  <DIV>thanks</DIV>  <DIV>Lorenzo</DIV>  <DIV><BR class="khtml-block-placeholder">  </DIV>  <DIV><BR class="khtml-block-placeholder">  </DIV>  <DIV><BR class="khtml-block-placeholder">  </DIV>  <DIV><BR class="khtml-block-placeholder">  </DIV>  <BR>  <BLOCKQUOTE type="cite">    <DIV> </DIV>    <DIV><BR class="khtml-block-placeholder">    </DIV>    <DIV>can anybody send advice or help me on this subject</DIV>    <DIV> </DIV>    <DIV> </DIV>    <DIV>parwaiz<BR>    </DIV>    <DIV> <BR class="khtml-block-placeholder">    </DIV>    <HR size="1">Do you Yahoo!?<BR> Get on board. <A href="http://us.rd.yahoo.com/evt=40791/*http://advision.webevents.yahoo.com/mailbeta">You're invited</A> to try the new Yahoo! Mail.    <DIV style="margin: 0px;">_______________________________________________</DIV>    <DIV style="margin: 0px;">ka-Map-users mailing list</DIV>    <DIV style="margin: 0px;"><A href="mailto:ka-Map-users@lists.maptools.org">ka-Map-users@lists.maptools.org</A></DIV>    <DIV style="margin: 0px;"><A href="http://lists.maptools.org/mailman/listinfo/ka-map-users">http://lists.maptools.org/mailman/listinfo/ka-map-users</A></DIV>  </BLOCKQUOTE>  </DIV>  <BR>  <PRE wrap=""><HR size="4" width="90%">
_______________________________________________
ka-Map-users mailing list
<A class="moz-txt-link-abbreviated" href="mailto:ka-Map-users@lists.maptools.org">ka-Map-users@lists.maptools.org</A>
<A class="moz-txt-link-freetext" href="http://lists.maptools.org/mailman/listinfo/ka-map-users">http://lists.maptools.org/mailman/listinfo/ka-map-users</A>
  </PRE> </BLOCKQUOTE> <BR>  </BLOCKQUOTE></DIV><BR></BODY></HTML>