denormalized-data

Why doesn't this mysql IN (1,2,3,4...) condition work if there are many values in the parenthesis?

I am storing in a column a list of states that are separated by commas: Like this: 1,2,3,4,5,6,7,8.. and so on, just their IDs. Then I am doing a query to get all the rows that have the state with the ID 8, and it works when the list of states has few items. This is the query and the table: mysql> select id_partner, name, states from...

Mysql WHERE problem

Hi, I need help for this problem. In MYSQL Table i have a field : Field : artist_list Values : 1,5,3,401 I need to find all records for artist uid 401 I do this SELECT uid FROM tbl WHERE artist_list IN ('401'); I have all record where artist_list fields values are '401' only, but if i have 11,401 this query do not match. An...