<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2523" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hi all,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>I'm working with the 4.4.0 beta2 release so i'm not 
sure if this is a bug, me doing something wrong or it's just not meant to do 
what i'm trying!</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>I have an Oracle Spatial layer defined in my map 
file :</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>LAYER<BR>&nbsp; NAME PostcodeData<BR>&nbsp; GROUP 
all<BR>&nbsp; TYPE POLYGON<BR>&nbsp; STATUS ON<BR>&nbsp; CONNECTIONTYPE 
oraclespatial<BR>&nbsp; CONNECTION "<A 
href="mailto:user/pwd@db">user/pwd@db</A>"<BR>&nbsp; DATA "GEOM FROM (SELECT 
B.GEOM, R.RESULTS, B.BASENAME, R.REPORT_ID FROM BASE B, RS_RESULTS_NUMBER R 
WHERE B.BASEID=R.GEOGID AND R.REPORT_ID = !REPORT_ID!) USING SRID 
8192"<BR></FONT></DIV>
<DIV><FONT face=Arial size=2>[more of the "usual" stuff here]</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>END</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>The !REPORT_ID! is a placeholder that I want to 
replace at runtime with a know value, which I try using a fragment of PHP code 
like this :</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;$map = 
ms_newMapObj($map_path."thematic.map");<BR>&nbsp;$dataLayer = 
$map-&gt;getLayerByName("PostcodeData");</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;echo 
$dataLayer-&gt;data."&lt;br&gt;";<BR>&nbsp;$data = str_replace("!REPORT_ID!", 
"19594", $dataLayer-&gt;data);<BR>&nbsp;echo 
$data."&lt;br&gt;";<BR>&nbsp;$dataLayer-&gt;data = $data;<BR>&nbsp;echo 
$dataLayer-&gt;data."&lt;br&gt;";</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;$image=$map-&gt;draw();<BR></FONT></DIV>
<DIV><FONT face=Arial size=2>Although the string replace is working fine and it 
looks like the assignment to $dataLayer-&gt;data is working too, when I make the 
call to draw() then it fails and throws out the SQL stored in the .map file, not 
the one I have manipulated on the fly.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>I have managed to workaround this using the FILTER 
statement (and corresponding PHP calls) for now&nbsp;but ideally i'd like to 
prove this can be done at the SQL level as i'm going to be doing more complex 
alterations to this SQL later on.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Many thanks,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Steve</FONT></DIV></BODY></HTML>