I am working on searching algorithm for an ecommerce platform. The platform is able to create variations for different products and all the available variations for a products are included in a comma separated column. Here are all the fields.
product_id
- eg 1variation_combo
- eg 54,35,49 (these are comma separated ids for different variations)product_name
- eg "Nike branded Tshirt"
Here is what i would like to achieve, something like
SELECT product_id FROM table where variation_combo contains 35 AND 54 AND 49
SELECT product_id FROM table where variation_combo contains 35 AND 54
SELECT product_id FROM table where variation_combo contains 49