How to search for the second value in the same line

I have a table where the values ​​look below.

Table Name: Movies
 Row Name: Genere

Row 1 Action, Crime, Thriller
 Row 2 Adventure
 Row 3 Mystery, Thriller

SELECT * FROM  `Movies` WHERE  `Genere` IN ('thriller',  'animation');                

But the values ​​are not retrieved, although there is a thriller.

1) Is the method that I saved in the MySQL table in phpMyAdmin correct?
 2) How to access the second or third values ​​with IN?

+4
source share
1 answer

Try the following:

SELECT * FROM  `Movies` WHERE FIND_IN_SET( 'thriller', `Genere`) 
                           OR FIND_IN_SET( 'animation', `Genere`) 
0
source

Source: https://habr.com/ru/post/1606362/


All Articles