I'm quite new. Can you help me with this problem? I have a database with several columns. I want to search a name in a column of names separated by comma (title of the columns is colours). Now I'm using FIND_IN_SET(name_to_find,title of column), the problem is that I have a positive match only if I search the whole name between the commas. For example I have a cell that contains: "red blue green, orange yellow black, white purple" I want to have a result both if I search "red blue green" that if I search only "blue" or "red" or "green" or "blue red". Is there a function similar to FIND_IN_SET that does that? Thank you very much for your help!!!!
Asked
Active
Viewed 123 times
1
-
Do you need help with Mysql query ? – 4EACH Nov 05 '17 at 15:38
-
4Stop using CSV columns. Normalize the DB, once you solve this issue you will just have another one to solve. https://stackoverflow.com/questions/3653462/is-storing-a-delimited-list-in-a-database-column-really-that-bad – chris85 Nov 05 '17 at 15:40