Hello.<br><br>I am trying to use oClass->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->setExpression("([id] = 19)"); works<br><br>as does (if I edit the session_id to be '85488')<br><br>$oClass->setExpression("([session_id] = 85488");<br><br><br>When I try<br><br>$oClass->setExpression("([session_id] = 85488e93fe70fe0d52eee0f6a60662b0)");<br><br>or <br><br>$oClass->setExpression("([session_id] = \"85488e93fe70fe0d52eee0f6a60662b0\")");<br><br>or<br><br>$oClass->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->getMetaData ("temp_only"), "true" ) == 0){<br>                        $oClass = ms_newClassObj($oLayer);<br>                        $oClass->setExpression("([session_id] = 85488)");#Displays ok<br>                        #$oClass->setExpression("([id] = 19)");#Displays ok<br>                        $oStyle = ms_newStyleObj($oClass);<br>                        $oStyle->color->setRGB(0,0,0);<br>                   
     $oStyle->outlinecolor->setRGB(0,0,0);<br>                        $oLayer->set('status',MS_ON);<br>                    }<br> <br><br>LAYER<br>   GROUP "TemporaryAddedPolygons" <br>   NAME "TemporaryAddedPolygons"<br>   TYPE POLYGON<br>   STATUS OFF<br>   CONNECTIONTYPE postgis<br>   CONNECTION "user=xx dbname=xx host=xx"<br>   DATA "the_geom FROM (select type,id,oid,the_geom,session_id from added_shapes_temp)  as foo using unique oid using srid=4326"<br>   METADATA<br>    "opacity" "50"<br>    "temp_only" "true"<br>    "tile_source" "nocache"<br>   END<br>   CLASSITEM "session_id"<br>END<br><br>I'm a bit  lost and would appreciate
 any help.<br><br>Cheers.<br><br>Donal.<br><br><br><br><br><p>
                <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.