<html>
<head>
</head>
<body>
   Hi Lowell,<br>
<br>
 that was that!<br>
<br>
 the code working is:<br>
 $dbrecord = dbase_get_record_with_names ($dbasefile, $theresult -&gt; shapeindex+1);<br>
<br>
<br>
 The list rocks!!! Thanks a lot!<br>
<br>
<br>
 Peter<br>
<br>
<br>
<br>
 Lowell.Filak wrote:<br>
<blockquote type="cite" cite="mid:Pine.LNX.4.33.0203260823330.13020-100000@yogi.medinaco.net">
  <pre wrap="">Try adding 1 to the result during the dbase query. The shape index starts<br>at 0 but the dbase file records start at 1. Hopefully that should give you<br>the correct result.<br>Lowell F.<br><br> On Tue, 26 Mar 2002, Peter wrote:<br><br></pre>
  <blockquote type="cite">
    <pre wrap="">Hi Listers,<br><br>doing a querybypoint the zoom to the queried polygon is doing well, but<br>the information is wrong. It gives the wrong result. Here's the code:<br><br>Thanks a lot<br><br><br>Peter<br><br><br> $queryresult = @$map -&gt; queryByPoint ($querypoint, MS_SINGLE, -1);<br><br><br>  if ($queryresult == MS_SUCCESS) {<br><br>    /* Bei einem Erfolg: Ergebnisse aus dem gew&uuml;nschten Layer holen*/<br>    $resultlayer = $map -&gt; getLayerByName ('objekte');<br><br>/* Uns interessiert nur das erste (i.e. nullte) Resultat */<br>    $theresult = $resultlayer -&gt; getResult (0);<br>    $shapefile = ms_newShapefileObj ('<a class="moz-txt-link-freetext" href="C:%5CProgramme%5CApache">C:\Programme\Apache</a><br>Group\Apache\htdocs\immogis3w\code\data\objekte', -1);<br>    $resultshape = $shapefile -&gt; getShape ($theresult -&gt; shapeindex);<br>    $resultbounds = $resultshape -&gt; bounds;<br><br><br><br>    /* Karte auf diese Extents zoomen */<br>   
 $ma
p -&gt; setExtent ($resultbounds -&gt; minx-80, $resultbounds -&gt;<br>miny-80,$resultbounds -&gt; maxx+80, $resultbounds -&gt; maxy+80); = CORRECT<br>ZOOM!!!<br>    $resultlayer = $map -&gt; getLayerByName ('objekte');<br>    $numresults = $resultlayer -&gt; getNumResults ();<br>    $theresult = $resultlayer -&gt; getResult (0);<br>    $resultclass = $resultlayer -&gt; getClass (0);<br><br>    $dbasefile = dbase_open ("<a class="moz-txt-link-freetext" href="C:%5CProgramme%5CApache">C:\Programme\Apache</a><br>Group\Apache\htdocs\immogis3w\code\data\objekte.dbf", 0);<br>    $dbrecord = dbase_get_record_with_names ($dbasefile, $theresult -&gt;<br>shapeindex);<br>    $Dummy = $dbrecord['ID'];<br>    printf ("%f&lt;br&gt;", $Dummy);  = WRONG RESULT!!!<br><br><br><br><br></pre>
    </blockquote>
    <pre wrap=""><!----><br><br></pre>
    </blockquote>
    <br>
    <br>
    </body>
    </html>