[Mapserver-users] setfilter with integer values
FX Gamoy
fx.gamoy at mapxplore.com
Sun Jan 11 16:54:47 PST 2004
This is a multi-part message in MIME format.
------=_NextPart_000_0009_01C3D8AF.0ECBCEA0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Happy new year everybody!!
i am using a binary 3.6.3 release of mapserver with php_mapscript.
I am having trouble with the setquery method and integer datas..
I am using tab files
i would like to select the feature where index=3D2 for example
$oLayer =3D $oMapSession->oMap->getLayerByName( $http_form_vars[ =
"layerref" ] );
$query=3D2;
$oLayer->setFilter($query);
=20
if (@$oLayer->queryByAttributes(MS_SINGLE) =3D=3D MS_SUCCESS)
{=20
......
}
i have used successfully this method with string values ($query=3D'id2') =
but never with integer values..
the log file return me :
[Mon Jan 12 01:36:44 2004] [error] [client 192.168.1.2] PHP Fatal error: =
MapServer Error in getSymbol(): (169):(147)
Is it better or faster to use integer values or string values to perform =
query, index or expression?
Any suggestion for my problem??
thanks
fx
------=_NextPart_000_0009_01C3D8AF.0ECBCEA0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1106" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Happy new year everybody!!</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>i am using a binary 3.6.3 release of =
mapserver with=20
php_mapscript.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I am having trouble with the setquery =
method and=20
integer datas..</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I am using tab files</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>i would like to select the feature =
where=20
index=3D2 for example</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>$oLayer =3D =
$oMapSession->oMap->getLayerByName(=20
$http_form_vars[ "layerref" ]=20
);<BR>$query=3D2;<BR>$oLayer->setFilter($query);<BR> <BR></FONT><=
FONT=20
face=3DArial size=3D2> if =
(@$oLayer->queryByAttributes(MS_SINGLE) =3D=3D=20
MS_SUCCESS)<BR>{ </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>......</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>}</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>i have used successfully this method =
with string=20
values ($query=3D'id2') but never with integer values..</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>the log file return me :</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>[Mon Jan 12 01:36:44 2004] [error] =
[client=20
192.168.1.2] PHP Fatal error: MapServer Error in getSymbol():=20
(169):(147)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Is it better or faster to use integer =
values or=20
string values to perform query, index or expression?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Any suggestion for my =
problem??</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>thanks</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>fx</FONT></DIV></BODY></HTML>
------=_NextPart_000_0009_01C3D8AF.0ECBCEA0--
More information about the MapServer-users
mailing list