<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Hi Julian,<br><br>That should work, if you look at the species maps at <a href="http://www.marinebiodiversity.org.nz">http://www.marinebiodiversity.org.nz</a><br>I do exactly that to substitute the selected species name into the SQL in the mapserver DATA statement to generate the WFS layer. <br><br>In this case the client application appends &amp;spp=xxxxx to the query string instead of doing it in the cgi, but I have done the same thing in cgi's as well.<br><br>Perhaps try it with a lower case variable name &amp; see if that works?<br><br>Cheers,<br><br>&nbsp; Brent Wood<br><br>--- On <b>Thu, 7/14/11, Julien Cigar <i>&lt;jcigar@ulb.ac.be&gt;</i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: Julien Cigar &lt;jcigar@ulb.ac.be&gt;<br>Subject: [mapserver-users] substitution in a PostGIS
 layer .. ?<br>To: mapserver-users@lists.osgeo.org<br>Date: Thursday, July 14, 2011, 12:29 AM<br><br><div class="plainMail">Hello,<br><br>I have the following mapfile: <a href="http://www.pastie.org/2206896" target="_blank">http://www.pastie.org/2206896</a> with the following SLD: <a href="http://www.pastie.org/2206902" target="_blank">http://www.pastie.org/2206902</a> (generated dynamically)<br><br>I wondered how can I change the WHERE sp.id=%SPID% in the subselect (following a CGI parameter)?<br><br>I read <a href="http://mapserver.org/cgi/runsub.html" target="_blank">http://mapserver.org/cgi/runsub.html</a>, and tried with %SPID% (by passwing &amp;SPID=3 in my URL) but it doesn't seems to work ... any idea?<br><br>Thanks,<br>Julien<br><br>-- No trees were killed in the creation of this message.<br>However, many electrons were terribly inconvenienced.<br></div><br>-----Inline Attachment Follows-----<br><br><div
 class="plainMail">_______________________________________________<br>mapserver-users mailing list<br><a ymailto="mailto:mapserver-users@lists.osgeo.org" href="/mc/compose?to=mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br><a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br></div></blockquote></td></tr></table>