<font size=2 face="sans-serif">In other threads of this list, it was suggested
to use a subquery in DATA instead of using FILTER, when postgis is used
as a datasource.</font>
<br><a href="http://mapserver.org/fr/input/vector/postgis.html#data-access-connection-method"><font size=2 color=blue face="sans-serif">http://mapserver.org/fr/input/vector/postgis.html#data-access-connection-method</font></a>
<br>
<br><font size=2 face="sans-serif">If you want to use only one mapfile
than runtime variable substitution can be used</font>
<p>
<br>
<br>
<br>
<table width=100% style="border-collapse:collapse;">
<tr valign=top height=8>
<td width=40% style="border-style:none none none none;border-color:#000000;border-width:0px 0px 0px 0px;padding:0px 0px;"><font size=1 face="sans-serif"><b>Carlos
Ruiz <boolean10001@yahoo.com>@lists.osgeo.org</b> </font>
<br><font size=1 face="sans-serif">Envoyé par : mapserver-users-bounces@lists.osgeo.org</font>
<p><font size=1 face="sans-serif">2015-03-20 14:53</font>
<table width=169 style="border-collapse:collapse;">
<tr valign=top height=8>
<td width=167 bgcolor=white style="border-style:solid solid solid solid;border-color:#000000;border-width:1px 1px 1px 1px;padding:0px 0px;">
<div align=center><font size=1 face="sans-serif">Veuillez répondre à<br>
Carlos Ruiz <boolean10001@yahoo.com></font></div></table>
<br>
<td width=59% style="border-style:none none none none;border-color:#000000;border-width:0px 0px 0px 0px;padding:0px 0px;">
<table width=100% style="border-collapse:collapse;">
<tr valign=top height=21>
<td width=57 style="border-style:none none none none;border-color:#000000;border-width:0px 0px 0px 0px;padding:0px 0px;">
<div align=right><font size=1 face="sans-serif">A</font></div>
<td style="border-style:none none none none;border-color:#000000;border-width:0px 0px 0px 0px;padding:0px 0px;"><font size=1 face="sans-serif">rishi
<rishe28@gmail.com>, "jmckenna@gatewaygeomatics.com" <jmckenna@gatewaygeomatics.com>,
"mapserver-users@lists.osgeo.org" <mapserver-users@lists.osgeo.org></font>
<tr valign=top height=21>
<td width=57 style="border-style:none none none none;border-color:#000000;border-width:0px 0px 0px 0px;padding:0px 0px;">
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td style="border-style:none none none none;border-color:#000000;border-width:0px 0px 0px 0px;padding:0px 0px;">
<tr valign=top height=21>
<td width=57 style="border-style:none none none none;border-color:#000000;border-width:0px 0px 0px 0px;padding:0px 0px;">
<div align=right><font size=1 face="sans-serif">Objet</font></div>
<td style="border-style:none none none none;border-color:#000000;border-width:0px 0px 0px 0px;padding:0px 0px;"><font size=1 face="sans-serif">Re:
[mapserver-users] display only one district</font></table>
<br>
<table width=393 style="border-collapse:collapse;">
<tr valign=top height=8>
<td width=57 style="border-style:none none none none;border-color:#000000;border-width:0px 0px 0px 0px;padding:0px 0px;">
<td width=336 style="border-style:none none none none;border-color:#000000;border-width:0px 0px 0px 0px;padding:0px 0px;"></table>
<br></table>
<br>
<br>
<br>
<br>
<br><font size=2 face="Arial">Rishi,</font>
<br>
<br><font size=2 face="Arial">From a MAP file approach, you can use the
FILTER tag inside of the LAYER section:</font>
<br>
<br><font size=2 face="Arial">FILTER [string]</font>
<br><font size=2 face="Arial">This parameter allows for data specific attribute
filtering that is done at the same time spatial filtering is done, but
before any CLASS expressions are evaluated. For OGR and shapefiles the
string is simply a mapserver regular expression. For spatial databases
the string is a SQL WHERE clause that is valid with respect to the underlying
database.</font>
<br>
<br><font size=2 face="Arial">For example: FILTER ([type]=’road’ and
[size]<2)</font>
<br><font size=2 face="Arial">In a static way, you will need to have two
MAP files (one without FILTER and another with FILTER) and you have to
configure each project to point to the right MAP file.</font>
<br>
<br><font size=2 face="Arial"> </font>
<br><font size=2 color=#0041c2 face="Verdana"><b>Mtro. Carlos Ruiz</b></font>
<br>
<br>
<hr><font size=2 face="Arial"><b>From:</b> rishi <rishe28@gmail.com><b><br>
To:</b> jmckenna@gatewaygeomatics.com; "mapserver-users@lists.osgeo.org"
<mapserver-users@lists.osgeo.org> <b><br>
Sent:</b> Friday, March 20, 2015 6:43 AM<b><br>
Subject:</b> [mapserver-users] display only one district</font>
<br>
<br><font size=3 face="Arial">Hi all</font>
<br><font size=3 face="Arial"> </font>
<br><font size=3 face="Arial">Iam using Postgres database to diasplay districts
on the google map</font>
<br>
<br><font size=3 face="Arial">It is working.</font>
<br><font size=3 face="Arial">But now i want to display only one district
instead of 50.</font>
<br><font size=3 face="Arial">In my database there are 50 districts data,
but i want to display only one.</font>
<br><font size=3 face="Arial">And also i have to use the same mapfile in
to 3 projects, in one project all the districts has to be displayed and
in one project only one district has to be display.</font>
<br>
<br><font size=3 face="Arial">How to do this</font>
<br><font size=3 face="Arial">plz send me the code</font>
<br><font size=3 face="Arial"><br>
_______________________________________________<br>
mapserver-users mailing list</font><font size=3 color=blue face="Arial"><u><br>
</u></font><a href="mailto:mapserver-users@lists.osgeo.org"><font size=3 color=blue face="Arial"><u>mapserver-users@lists.osgeo.org</u></font></a><font size=3 color=blue face="Arial"><u><br>
</u></font><a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target=_blank><font size=3 color=blue face="Arial"><u>http://lists.osgeo.org/mailman/listinfo/mapserver-users</u></font></a><font size=3 face="Arial"><br>
</font><tt><font size=2>_______________________________________________<br>
mapserver-users mailing list<br>
mapserver-users@lists.osgeo.org<br>
</font></tt><a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users"><tt><font size=2>http://lists.osgeo.org/mailman/listinfo/mapserver-users</font></tt></a>
<br>
<br>
<br>