[mapguide-users] Advanced search of layer - Can I use multiple filters?

Zac Spitzer zac.spitzer at gmail.com
Tue Oct 26 04:55:05 EDT 2010


i think your overwriting $filterQuery with $filterQuery2

did you try putting it all in once setFilter ?

z



On Tue, Oct 26, 2010 at 7:29 PM, shepwaydistrictcouncil
<neil.thompson at shepway.gov.uk> wrote:
>
> Hi
>
> I'm currently pulling back addresses from a layer using the following code:
>
> // create a filter to select the desired features.
> $queryOptions = new MgFeatureQueryOptions();
> $filterQuery = $_GET['searchColumn'] . " LIKE '%" . $_GET['searchValue'] .
> "%'";
> $queryOptions->SetFilter($filterQuery);
>
> I would however like to add more than one query into this is it possible?
>
> Something like:
> $queryOptions = new MgFeatureQueryOptions();
> $filterQuery = "c_uprn LIKE '%" . $_GET['searchValue'] . "%'";
> $filterQuery2 = "AND c_paon LIKE '%" . $_GET['paonValue'] . "%'";
>
> $queryOptions->SetFilter($filterQuery);
> $queryOptions->SetFilter($filterQuery2);
>
> --
> View this message in context: http://osgeo-org.1803224.n2.nabble.com/Advanced-search-of-layer-Can-I-use-multiple-filters-tp5673825p5673825.html
> Sent from the MapGuide Users mailing list archive at Nabble.com.
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>



-- 
Zac Spitzer
Solution Architect / Director
Ennoble Consultancy Australia
http://www.ennoble.com.au
http://zacster.blogspot.com
+61 405 847 168


More information about the mapguide-users mailing list