This post may be helpful:<br>     <a href="http://mapserver.gis.umn.edu/data2/wilma/mapserver-users/0405/msg00714.html">http://mapserver.gis.umn.edu/data2/wilma/mapserver-users/0405/msg00714.html</a><br><br>Aaron<br><br><div>
<span class="gmail_quote">On 6/23/06, <b class="gmail_sendername">Nigel Gilbert</b> <<a href="mailto:n.gilbert@surrey.ac.uk">n.gilbert@surrey.ac.uk</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
[Many thanks to those who helped me yesterday overcome a problem with<br>creating an oid index, now solved as a result of their advice]<br><br>I have a PostGIS database including a table, world, with columns,<br>object_type (containing either one of the strings, 'plants' or 'agents') and
<br>'geom', containing points.  In my map file I have:<br><br>LAYER<br>    NAME World<br>    CONNECTIONTYPE    postgis<br>    CONNECTION    "user=..... dbname=...."<br>    DATA                "geom from world"
<br>    STATUS            ON<br>    TYPE                POINT<br><br>    CLASS<br>        NAME            Agents<br>        EXPRESSION    ([object_type] = 'agents')<br>        STYLE<br>            COLOR        255 111 207    # pink
<br>        END<br>    END<br><br>    CLASS<br>        NAME            Plants<br>        EXPRESSION ([object_type] = 'plants')<br>        STYLE<br>            COLOR        0 128 64        # green<br>        END<br>    END
<br>END<br><br>This gives a map displaying nothing, although if I comment out the<br>expressions, I get the points I would then expect.  In other words, the<br>expressions are always returning false.  But getting the data directly:
<br><br> select object_type, AsText(geom) from world limit 3;<br>                                             object_type<br>|     astext<br>----------------------------------------------------------------------------<br>
--------------------------+----------------<br> plants<br>| POINT(13 19)<br> plants<br>| POINT(228 840)<br> plants<br>| POINT(694 674)<br>(3 rows)<br><br>is fine.  What's wrong??<br><br>Thanks again!<br><br>Nigel<br></blockquote>
</div><br><br clear="all"><br>-- <br>+--------------------------------------------<br>|  Aaron Koning<br>|  Information Technologist<br>|  Prince George, BC, Canada.<br>+--------------------------------------------<br>|  
<a href="http://datashare.gis.unbc.ca/fist/">http://datashare.gis.unbc.ca/fist/</a><br>|  <a href="http://datashare.gis.unbc.ca/gctp-js/">http://datashare.gis.unbc.ca/gctp-js/</a><br>+--------------------------------------------