"height like '%1%' or height like '%2%' or height like '%5%'"
Say there are a lot of bindings for just this one attribute.
They are not in order, they are random.
How can this sql be simplified?
"height like ('%2%' or '%1%' or '%5%')
Code is just an example.
I'm not looking for injection suggestions.
There is no equivalent to IN for LIKE. Your first method is the correct approach.
WHERE (height LIKE '%foo%' OR height LIKE '%bar%' OR height LIKE '%baz%')
Note that this will be slow. You may want to look at a full text search instead.