I am trying to retrieve several records from my database with the following query:
User.where('name ilike ?','%thomas%')
this works great. Now I want to get several records at the same time and tried this (which seems syntactically wrong):
User.where('name ilike any',['%thomas%','%james%','%martin%'])
What am I doing wrong?
So, just to clarify: I want to get all the records corresponding to one of the names, so its the OR query I'm looking for.
source share