Jump to:

23478 Posts in 18941 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » datalist query multiple columns

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: 322 Views
  • Guy Van Bael
    Avatar
    Community Member
    33 Posts

    datalist query multiple columns Link to this post

    Hi,

    I found this in the doc section, but somehow i can't seem to make it work. Adding multiple colums to query returns server error.

    **** this is the doc ****
    If you wish to match against any of a number of columns, you can list several field names, separated by commas. This will return all members whose first name or surname contain the string 'sam'.

    $members = Member::get()->filter(array(
    'FirstName,Surname:PartialMatch' => 'sam'
    ));

    **********

    Anyone got this working?

    322 Views
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.