I have a field in tables, with datatype “set” so that it can accept multiple values. But I got stuck at the time, when I am retrieving the results matching values to it.
An Example field
"menuPosition" : set('top','left','right','bottom')
An Example query
SELECT * FROM mytable where menuPosition='top'
This query only returns those rows with only top as their values, the rows having multiple values like top,left are not returned. How to retrieve all those records?
And since my above query only compares one values, how to write a query to match multiple values like where menuPosition='top' && 'bottom'
You caeither use
FIND_IN_SETlike:Or you can use
LIKE:I guess the first one is faster.