probleme with querybyattributes
fx gamoy
fx.gamoy at MAPXPLORE.COM
Fri Dec 10 04:35:21 PST 2004
Hello everybody,
i am getting problems with querybyattributes
I use a self-compiled php/mapscript 4.2.4 (--with-regex=system) on a linux mandrake box.
Querybyattributes works fine using integer on a point type layer.
When i try to do the same using a line layer, mapserver return me the whole lines of the layer instead of only the selected ones.
$oLayer = $oMapSession->oMap->getLayerByName( 'listvoies' ); // (listvoies with template "something")
$dblquery = "([CODE_VOIE] = ".$_SESSION["index"].")"; //CODE_VOIE is integer
$fieldname= "CODE_VOIE";
if (@$oLayer->queryByAttributes($fieldname, $dblquery, MS_MULTIPLE) == MS_SUCCESS)
{
$oLayer->open();
$nbrep=$oLayer->getNumResults();
echo $nbrep; //return 1200 that's to say the whole file
}//if
What is wrong?
i've tried many way to exprim $dblquery but i get still the same issue.
The same use of querybyattributes works fine when i use a point type layer...
Any help wil be appreciated.
thanks
fx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20041210/0d569b8a/attachment.htm>
More information about the MapServer-users
mailing list