<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
Hi,<br><br>I have looked into this more and it may not be the special characters. I can not change the filter in any way using this url parameter method. The only url filter parameter that works is an empty one:<br><br>mapserv?map.layer[0].filter=''&amp;<br><br>If I add any filter into the single quotes (even a very simple one), then I get this error:<br><br>mapserv?map.layer[0].filter='oid=5'&amp;<br><br>loadLayer(): Unknown identifier. Parsing error near (oid=5):(line 1)
<br><br>Does anyone know the correct syntax for this parameter? I am going but this document page:<br><br>http://mapserver.org/cgi/controls.html<br><br>In this section:<br><br><h2>Changing map file parameters via a form or a URL</h2><br><br>Thanks,<br>Scott<br><br><br><br><div>
<div>********************************************* </div>Scott Pezanowski 
<div></div>
<div></div>
<div></div>email: scottpez@hotmail.com&nbsp; 
<div></div>*********************************************</div><br><br><br><br><hr id="stopSpelling">From: scottpez@hotmail.com<br>To: mapserver-users@lists.osgeo.org<br>CC: scottpez@hotmail.com<br>Subject: Changing map file parameters via a URL - special characters<br>Date: Wed, 11 Aug 2010 10:35:23 -0400<br><br>

<meta http-equiv="Content-Type" content="text/html; charset=unicode">
<meta name="Generator" content="Microsoft SafeHTML">
<style>
.ExternalClass .ecxhmmessage P
{padding:0px;}
.ExternalClass body.ecxhmmessage
{font-size:10pt;font-family:Tahoma;}

</style>


Hi,<br><br>I am trying to use mapserver to generate image maps from a PostGIS connection based upon a user entered FILTER. The data column I am trying to filter by is a tsvector column type. So the FILTER for my LAYER looks something like this:<br><br>FILTER "textsearchable_index_col @@ to_tsquery('search terms')"<br><br>I do have things working where I can hard code the FILTER for the LAYER in the MAP file. Things work great and I am very happy about this. The problem lies that I would now like to allow my client application to change this FILTER dynamically through a URL request based upon what search terms the user enters. So the URL would look something like this:<br><br>http://.../mapserv?map.layer[layername].filter=%22textsearchable_index_col%20@@%20to_tsquery%28%27newsearchterms%27%29%22&amp;mode=map&amp;map=mapfile.map&amp;layers=layername&amp;map_imagetype=png&amp;mapext=-73203436.227488+-51717904.824712+73203436.227488+51717904.824712&amp;imgext=-73203436.227488+-51717904.824712+73203436.227488+51717904.824712&amp;map_size=1870+1321&amp;imgx=935&amp;imgy=660.5&amp;imgxy=1870+1321<br><br>I am getting the following error:<br><br>loadLayer(): Unknown identifier. Parsing error near (textsearchable_index_col @@ to_tsquery('newsearchterms')):(line 1)
<br><br>Through looking around a little, I believe the "@@" special characters in the filter parameter are causing the issue. Can anyone confirm that this is may be the case (or think of what else may be the issue) and suggest a workaround (escaping these characters in some way, etc.)?<br><br>Thanks,<br>Scott<br><br><br><div>
<div>********************************************* </div>Scott Pezanowski 
<div></div>
<div></div>
<div></div>email: scottpez@hotmail.com&nbsp; 
<div></div>*********************************************</div><br><br>                                               </body>
</html>