我不知道如何合并这两个查询并立即为它们获取结果。
$q1 = "SELECT q.id, q.content, a.id, a.content, a.addDT, acr.score
FROM questions_and_exercises q, `lesson-question` lq
LEFT JOIN answers a ON (a.uid=? AND a.qid=lq.qid)
LEFT JOIN `answer_chk_results` acr ON (acr.aid=a.id)
WHERE q.id=lq.qid AND lq.lid=?";
$q2 ="SELECT q.id, q.content, a.id, a.content, a.addDT, acr.score
FROM questions_and_exercises q,
`questions from-to` qft
LEFT JOIN answers a ON (a.uid=? AND a.qid=qft.qid)
LEFT JOIN `answer_chk_results` acr ON (acr.aid=a.id)
WHERE q.id=qft.qid AND qft.to_uid=?";
建议?提前致谢