MySQL doesn't complain when "chained inequality" syntax is used in a query's
WHERE 10 < score < 15;
WHERE score > 10 AND score < 15;
According to the documentation:
For operators that occur at the same precedence level within an expression, evaluation proceeds left to right, with the exception that assignments evaluate right to left.
MySQL will evaluate this as:
WHERE (10 < score) < 15
Because MySQL treats boolean values as numbers in a numeric context, the parenthesized part is turned into 0 or 1 (or
NULL) for the subsequent comparison. So, the result is always true.
I believe this explains both why MySQL doesn't produce an error and why you are getting different results from what you expect.
You have various options using
AND, but this would be typical:
WHERE score > 10 AND score < 15