[Chameleon] Custom Query/PHP Help
Mike Leahy
mgleahy at alumni.uwaterloo.ca
Mon Dec 5 17:44:20 EST 2005
Hello Tim,
Maybe you could try var_dump($aResult); in the php code - this will show
you a description of the entire array variable and its contents, which
might help you determine the source of your problem.
Mike
Tim Badtke wrote:
> 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
> http://lists.maptools.org/pipermail/chameleon/2005-January/001802.html
> <http://lists.maptools.org/pipermail/chameleon/2005-January/001802..html>.
> I'm having a problem displaying fields. Here's the code:
>
> foreach( $aResults as $nLayerIdx => $aResult)
> {
> $oLayer = $oMapSession->oMap->getLayer($nLayerIdx);
> $szName = $oLayer->name;
> if( $szName == 'indx2000' )
> {
> echo 'Photo Number: ' . $aResult['TILE_ID'] . '<br>';
> echo 'County: ' . $aResult['COUNTY'] . '<br>';
> echo '<img src="../photos/2000/'.$aResult['TILE_ID'].'">';
> }
>
> The query prints out
>
> Photo Number:
> County:
>
> 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?
>
> Thank you,
> Tim
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Chameleon mailing list
> Chameleon at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/chameleon
More information about the Chameleon
mailing list