Multiple Field Search
Armin Burger
armin.burger at GMX.NET
Tue Sep 6 14:26:29 PDT 2005
Abe,
with Mapscript you can search for multiple fields. It's not very clear
in the documentation, but it works.
You have to specify an existing field of the layer for 'qitem', for
'qstring' you can define a filter statement that includes more than one
field/item, like
$qitem = 'FIELD1';
$qstring = "[FIELD1] > 23 AND '[FIELD2]' = 'blabla'" ;
$mylayer->queryByAttributes($qitem, $qstring, MS_MULTIPLE);
I think case-insensitive queries just work using regular expresions.
Armin
Abe Gillespie wrote:
> Just for clarification, querying on multiple fields is NOT supported,
> correct? Unfortunately my current client requires compound queries of
> this nature, but I forgot MapServer didn't natively do this. I
> noticed that Chameleon actually queries DBFs external to MapServer's
> API. I certainly can piggy-back on this method and just test each
> case in the compound query by hand and keep records that past the
> entire set of tests. Unfortunately I'm no genius in search technology
> and my methods will be done linearlly and obviously SLOWLY.
>
> Can anyone offer any guidance, resources, or any other help?
>
> Thanks.
> -Abe
>
>
More information about the MapServer-users
mailing list