So it's just a simple question I have this query. It's not working so I just thought I'd make sure that this isn't possible.
SELECT * FROM warehouse WHERE sku LIKE IN ($clean) AND style= :style9 ORDER BY sku ASC
I don't recognize LIKE IN as a thing.
You might try sku LIKE '%' + ($clean) + '%'
Or, if you're looking for it the other way around: ($clean) LIKE '%' + sku + '%'
Is there a combination of "LIKE" and "IN" in SQL? Here is a discussion of using Contains, if you would like to try using that.
Not knowing what your $clean value looks like (or your sku values or expected results) I can only guess, but REGEXP, also known as RLIKE, might be useful here.
Say you're looking for SKU's like 'AB%', 'XY%', and 'FG%'. You can do that with RLIKE as follows:
SELECT * FROM warehouse WHERE sku RLIKE '^(AB|XY|FG)' AND ...
$clean? What is the expected outcome?LIKEandINboth exist, butLIKE INdoesn't, and I can't think of any artifact that would behave the way I think you want (if$cleanwere a list of string patterns).