以下查询工作正常,但在 New Relic 工具中显示错误。
错误信息:
MysqlError: 你的 SQL 语法有错误;检查与您的 MySQL 服务器版本相对应的手册,以在第 4 行的“ORDER BY q.display_order, a.display_order ASC”附近使用正确的语法
SQL查询:
SELECT q.question_id,
a.answer_id,
q.question_name,
a.option_name,
q.display_order AS ques_order,
a.correct,
a.display_order AS opt_order
FROM questions q
JOIN answers a
ON (a.question_id = q.question_id)
WHERE test_id = 24
ORDER BY q.display_order, a.display_order ASC