filterByAttribute
Permalink
I want to search the users with the magic method of the user_list model.
This is my code
When using the debug mode of the db class I see that the code creates a mysql_query like this:
Instead of AND I want to use OR in my query. Is there a way to do this without creating another function in the model user_list.php?
This is my code
$userList->filterByAddress('%'.$keywords.'%', 'LIKE'); $userList->filterByZipcode('%'.$keywords.'%', 'LIKE'); $userList->filterByCity('%'.$keywords.'%', 'LIKE');
When using the debug mode of the db class I see that the code creates a mysql_query like this:
... and ak_address = '%keyword%' and ak_zipcode = '%keyword%' and ak_city = '%keyword%'...
Instead of AND I want to use OR in my query. Is there a way to do this without creating another function in the model user_list.php?
(I just saw that in the documentation, haven't tested it out so I'm not sure if it will work).