This question has already been answered:

For example, there is a structure of the product table and it has a categ_id column and it has categorized categorized = 1,2,3 separated by a comma. How to form a query, for example, only to check if it belongs to category 2?

Reported as a duplicate by members of Streletz , aleksandr barakin , dirkgntly , Pavel Mayorov , Mike 21 Aug '16 at 11:18 .

A similar question was asked earlier and an answer has already been received. If the answers provided are not exhaustive, please ask a new question .

    1 answer 1

    slightly corrected from off. MySql documentation:

     SELECT FIND_IN_SET('2','1,2,3,4'); 

    those. the WHERE complemented by AND FIND_IN_SET(...)