<!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> </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> </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> </DIV>
<DIV><FONT face=Arial size=2>LAYER<BR> NAME PostcodeData<BR> GROUP
all<BR> TYPE POLYGON<BR> STATUS ON<BR> CONNECTIONTYPE
oraclespatial<BR> CONNECTION "<A
href="mailto:user/pwd@db">user/pwd@db</A>"<BR> 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> </DIV>
<DIV><FONT face=Arial size=2>END</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </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> </DIV>
<DIV><FONT face=Arial size=2> $map =
ms_newMapObj($map_path."thematic.map");<BR> $dataLayer =
$map->getLayerByName("PostcodeData");</FONT></DIV>
<DIV><FONT face=Arial size=2> echo
$dataLayer->data."<br>";<BR> $data = str_replace("!REPORT_ID!",
"19594", $dataLayer->data);<BR> echo
$data."<br>";<BR> $dataLayer->data = $data;<BR> echo
$dataLayer->data."<br>";</FONT></DIV>
<DIV><FONT face=Arial size=2> $image=$map->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->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> </DIV>
<DIV><FONT face=Arial size=2>I have managed to workaround this using the FILTER
statement (and corresponding PHP calls) for now 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> </DIV>
<DIV><FONT face=Arial size=2>Many thanks,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Steve</FONT></DIV></BODY></HTML>