Filter users by custom attributes – not showing all results
Permalink 1 user found helpful
When performing the following user attribute filters, I'm hoping to get all possible results, but I don't.
In my database:
User 1:
K-8
User 2:
High School
Middle School
User 3:
High School
Middle School
K-8
University
User 4:
University
User 5:
Middle School
University
User 6:
High School
University
These filters will only give me User 2, 3, and 6. I'm hoping to get User 5 as well. What am I doing wrong?
It doesn't matter if I change the filter comparison operator to '=' or 'LIKE', it gives me the same results.
Thanks!
$this->userList->filterByAttribute('school_type', array('High School', 'Middle School'), 'LIKE'); OR $this->userList->filterByAttribute('school_type', 'High School')); $this->userList->filterByAttribute('school_type', 'Middle School'));
In my database:
User 1:
K-8
User 2:
High School
Middle School
User 3:
High School
Middle School
K-8
University
User 4:
University
User 5:
Middle School
University
User 6:
High School
University
These filters will only give me User 2, 3, and 6. I'm hoping to get User 5 as well. What am I doing wrong?
It doesn't matter if I change the filter comparison operator to '=' or 'LIKE', it gives me the same results.
Thanks!