Returns the index (position) of str in the str1, str2, str3, ... list. Returns 0 if str is not found.
SELECT FIELD('Bb', 'Aa', 'Bb', 'Cc', 'Dd', 'Ff');
2
SELECT FIELD('Gg', 'Aa', 'Bb', 'Cc', 'Dd', 'Ff');
0
If all arguments to FIELD() are strings, all arguments are compared as strings. If all arguments are numbers, they are compared as numbers. Otherwise, the arguments are compared as double.
SELECT FIELD('Bb', 'Aa', 'Bb', 'Cc', 'Dd', 'Ff');
2
SELECT FIELD('Gg', 'Aa', 'Bb', 'Cc', 'Dd', 'Ff');
0