Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Multiple PartialMatch

Go to End

2 Posts   438 Views


Community Member, 5 Posts

13 March 2014 at 3:06pm

Edited: 13/03/2014 3:07pm


Can anyone confirm me that it is possible to do multiple PartialMatch in a single request (i'm using SS 3.1.2)?

ie :

$request = mydatabase::get()->filter(array(
			'type:PartialMatch' => "one",
			'type:PartialMatch' => "two"));

For me only the last PartialMatch, so"two", is filtered. The first one is omited.

My goal is to filter the data which contain both"one" and "two".



Community Member, 107 Posts

14 March 2014 at 11:23pm

try row sql

mydatabase::get()->where("\"type\" = '%one%' or \"type\" = '%two%' ");