我如何为mysql中的两个单独字段设置顺序
代码
$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 = '.$m_test_id.' ORDER BY ques_order, opt_order ASC';
错误信息:
MysqlError: 你的 SQL 语法有错误;检查与您的 MySQL 服务器版本相对应的手册,以在第 4 行的“ORDER BY ques_order, opt_order ASC”附近使用正确的语法
ORDER BY ques_order, opt_order ASC;