<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2769" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=187330621-05122005><FONT face=Arial size=2>I'm trying to get
the custom query working for me. I want to show a photo index so the user
can click a photo and see it in a pop up window. I found this thread while
playing around with the Tiki custom query <A
href="http://lists.maptools.org/pipermail/chameleon/2005-January/001802.html">http://lists.maptools.org/pipermail/chameleon/2005-January/001802.html</A>.
I'm having a problem displaying fields. Here's the
code:</FONT></SPAN></DIV><SPAN class=187330621-05122005><FONT size=2><FONT
face="Courier New">
<DIV><BR><SPAN style="mso-spacerun: yes"> </SPAN>foreach( $aResults
as $nLayerIdx => $aResult)<BR><SPAN style="mso-spacerun: yes">
</SPAN>{<BR><SPAN style="mso-spacerun: yes">
</SPAN>$oLayer = $oMapSession->oMap->getLayer($nLayerIdx);<BR><SPAN
style="mso-spacerun: yes"> </SPAN>$szName =
$oLayer->name;<BR><SPAN
style="mso-spacerun: yes"> </SPAN>if(
$szName == 'indx2000' )<BR><SPAN
style="mso-spacerun: yes">
</SPAN>{<BR><SPAN style="mso-tab-count: 1">
</SPAN><SPAN style="mso-spacerun: yes"> </SPAN>echo
'Photo Number: ' . $aResult['TILE_ID'] . '<br>';<BR><SPAN
style="mso-spacerun: yes"> </SPAN>echo
'County: ' . $aResult['COUNTY'] . '<br>';<BR><SPAN
style="mso-spacerun: yes"> </SPAN>echo
'<img src="../photos/2000/'.$aResult['TILE_ID'].'">';<BR><SPAN
style="mso-spacerun: yes">
</SPAN>}<BR><SPAN style="mso-spacerun: yes">
</SPAN></FONT></FONT><BR><FONT face=Arial size=2>The query prints
out</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><SPAN class=187330621-05122005><FONT face=Arial size=2>
Photo Number:</FONT></SPAN></DIV>
<DIV><SPAN class=187330621-05122005> <FONT face=Arial
size=2>County:</FONT></SPAN></DIV>
<DIV><SPAN class=187330621-05122005> </SPAN></DIV>
<DIV><SPAN class=187330621-05122005><FONT face=Arial size=2>with no image.
I'm not very familiar with php but I know that the $aResult['TILE_ID'] isn't
returning anything. If I just use $aResult I get the contents of the array
- all the fields in the table. Can someone point me in the right direction
for returning values from the fields I need?</FONT></SPAN></DIV>
<DIV><SPAN class=187330621-05122005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=187330621-05122005><FONT face=Arial size=2>Thank
you,</FONT></SPAN></DIV>
<DIV><SPAN class=187330621-05122005><FONT face=Arial
size=2>Tim</FONT></SPAN></DIV></SPAN></BODY></HTML>