Função String FIELD() no Banco de Dados
Retorna o índice de str
na lista str1
, str2
, str3
, ...
. Retorns 0
se str
não for encontrada. FIELD()
é o complemento de ELT()
:
mysql>SELECT FIELD('ej', 'Hej', 'ej', 'Heja', 'hej', 'foo');
-> 2 mysql>SELECT FIELD('fo', 'Hej', 'ej', 'Heja', 'hej', 'foo');
-> 0