[mapserver-users] QueryByAttribute sometimes not working
Bistrais, Bob
Bob.Bistrais at maine.gov
Fri Feb 18 07:39:28 PST 2011
I'm having a strange problem with a queryByAttributes operation in a
MapServer application. Most of the time it works correctly, but
sometimes it returns 0 results.
It is querying a shapefile, if that gives a clue.
My first suspicion was the data wasn't matching the query expression.
But I checked and it appears to be correct. To add to the confusion,
the application will sometimes select the queried feature, but not
always.
Here is the query expression:
$query = "( ('[GEOCODE]' == '".$_SESSION['geocode']."') && ('[PLAN]' ==
'".$_SESSION['plan']."') && ('[LOT]' == '".$_SESSION['lot']."') )";
And here is the execution of the query:
$oLayer _parcels->queryByAttributes("GEOCODE", $query, MS_SINGLE);
I echoed back the query statement, and it looks correct.
This one is pretty confusing. Has anyone seen anything like this?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20110218/4d2f9e91/attachment.htm>
More information about the MapServer-users
mailing list