Not This:
"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?
Something like this:
"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.
Note that this will be slow. You may want to look at a full text search instead.