I am trying to search a field for keywords and I am generating the criteria with addSearchCondition. I currently have it like this
This is producing a SQL error. I cannot see the generated query and I can find no documentation on how to do this with addSearchCondition. Any help?
Just remove "LIKE" in the first parameter…
Ah, it automatically knows because it is a text field, nice! Many thanks!
Not actually… If you take a look at the Documentation, you would see that the function takes 5 parameters and the last three of them are optional. The fifth parameter is the like-keyword and defaults to ‘LIKE’