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.

General Questions

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

datalist query multiple columns


Reply

329 Views

Avatar
Guy Van Bael

6 October 2012 at 3:48am Community Member, 34 Posts

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?