I'm generating a string of values (colors) like so:
'red|green|blue|yellow|orange|black'
Can I pass this as a parameter (param_cols) to a MySQL stored procedure and check against it like so:
SELECT tbl.products
FROM table AS tbl
WHERE tbl.color IN ( param_cols );
Question: Is this possible using a parameter? Should I use IN, LIKE or REGEX?
EDIT:
THANKS for the hints. However I'm more concerned about whether I can pass my list of colors as a variable into the stored procedure vs having to insert each color individually?