Jump to:

23489 Posts in 18996 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » Multiple PartialMatch

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

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

Page: 1
Go to End
Author Topic: 155 Views
  • blueace
    Community Member
    3 Posts

    Multiple PartialMatch Link to this post


    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".


  • thomas.paulson
    Community Member
    74 Posts

    Re: Multiple PartialMatch Link to this post

    try row sql

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

Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.