Fixed error on SQL statement when backend is MYSQL