FIND_IN_SET(str,strlist): Returns the index of str in strlist : FIND_IN_SET « String Functions « MySQL Tutorial






This function does not work properly if the first argument contains a comma (',') character.

mysql>
mysql> SELECT FIND_IN_SET('b','a,b,c,d');
+----------------------------+
| FIND_IN_SET('b','a,b,c,d') |
+----------------------------+
|                          2 |
+----------------------------+
1 row in set (0.00 sec)








23.13.FIND_IN_SET
23.13.1.FIND_IN_SET(str,strlist): Returns the index of str in strlist
23.13.2.Using FIND_IN_SET with data in a table