By default, there must be no whitespace between a function name and the parenthesis following it. This helps the MySQL parser distinguish between function calls and references to tables or columns that happen to have the same name as a function. However, spaces around function arguments are permitted.
When you sort using "ORDER BY FIELD" if there is a space after that it doesn’t
For example, this works:
SELECT * FROM people WHERE person_id IN (10, 20) ORDER BY FIELD(person_id, 20,
but this does not:
SELECT * FROM people WHERE person_id IN (10, 20) ORDER BY FIELD (person_id,
All just because I put in a space between "FIELD" and the "(".