MySQL Query a List of Values


I want to create a query from a list of values and return data for every match of cat.

This works but it's not requiring the options value. What's the easier way to query a list of values?

FROM `table1` 
WHERE `option`='R' && `cat`='12' || `cat`='18' || `cat`='30'

Best Solution

You can use the IN operator

`cat` IN ('12', '18', 30')