Hello.<br><br>I am trying to use oClass-&gt;setExpression() and can only get it to work if the value I'm setting is a number as opposed to a string.<br><br>For example <br><br>In my db I have an entry with <br>id = 19;<br>session_id = 85488e93fe70fe0d52eee0f6a60662b0.<br><br>I'm trying to get this entry and style it.<br><br>$oClass-&gt;setExpression("([id] = 19)"); works<br><br>as does (if I edit the session_id to be '85488')<br><br>$oClass-&gt;setExpression("([session_id] = 85488");<br><br><br>When I try<br><br>$oClass-&gt;setExpression("([session_id] = 85488e93fe70fe0d52eee0f6a60662b0)");<br><br>or <br><br>$oClass-&gt;setExpression("([session_id] = \"85488e93fe70fe0d52eee0f6a60662b0\")");<br><br>or<br><br>$oClass-&gt;setExpression("([session_id] = '85488e93fe70fe0d52eee0f6a60662b0')");<br><br><br>my shapes don't appear. It looks like there it doesn't like the letters in my string.<br><br>Any ideas?<br><br>My code and mapfile layer follow.<br><br>if
 (strcmp($oLayer-&gt;getMetaData ("temp_only"), "true" ) == 0){<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $oClass = ms_newClassObj($oLayer);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $oClass-&gt;setExpression("([session_id] = 85488)");#Displays ok<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; #$oClass-&gt;setExpression("([id] = 19)");#Displays ok<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $oStyle = ms_newStyleObj($oClass);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $oStyle-&gt;color-&gt;setRGB(0,0,0);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
 &nbsp;&nbsp;&nbsp; $oStyle-&gt;outlinecolor-&gt;setRGB(0,0,0);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $oLayer-&gt;set('status',MS_ON);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br> <br><br>LAYER<br>&nbsp;&nbsp; GROUP "TemporaryAddedPolygons" <br>&nbsp;&nbsp; NAME "TemporaryAddedPolygons"<br>&nbsp;&nbsp; TYPE POLYGON<br>&nbsp;&nbsp; STATUS OFF<br>&nbsp;&nbsp; CONNECTIONTYPE postgis<br>&nbsp;&nbsp; CONNECTION "user=xx dbname=xx host=xx"<br>&nbsp;&nbsp; DATA "the_geom FROM (select type,id,oid,the_geom,session_id from added_shapes_temp)&nbsp; as foo using unique oid using srid=4326"<br>&nbsp;&nbsp; METADATA<br>&nbsp;&nbsp;&nbsp; "opacity" "50"<br>&nbsp;&nbsp;&nbsp; "temp_only" "true"<br>&nbsp;&nbsp;&nbsp; "tile_source" "nocache"<br>&nbsp;&nbsp; END<br>&nbsp;&nbsp; CLASSITEM "session_id"<br>END<br><br>I'm a bit&nbsp; lost and would appreciate
 any help.<br><br>Cheers.<br><br>Donal.<br><br><br><br><br><p>&#32;
                <hr size=1> 
<a href="http://us.rd.yahoo.com/mail/uk/taglines/default/messenger/*http://uk.messenger.yahoo.com">Yahoo! Messenger</a> - with free PC-PC calling and photo sharing.