首页上一页 1 下一页尾页 1 条记录 1/1页
JSP项目开发全程实录 08章 在线考试系统有关问题
发表在JavaWeb图书答疑
2010-05-13
是否精华
是
否
版块置顶:
是
否
不能进入到考试,LessonDAO.java中sql语句查询课程ID有问题?
String sql="SELECT * FROM tb_lesson WHERE ID in(SELECT distinct lessonID FROM " +
"(SELECT lessonId,taoTiID FROM tb_questions GROUP BY taoTiID,lessonID,type)" +
" as lessonTaoTi GROUP BY lessonId,taoTiID HAVING COUNT(taoTiID) >1) AND" +
" name not in (SELECT distinct whichLesson FROM tb_stuResult WHERE stuId='"+studentID+"')";
String sql="SELECT * FROM tb_lesson WHERE ID in(SELECT distinct lessonID FROM " +
"(SELECT lessonId,taoTiID FROM tb_questions GROUP BY taoTiID,lessonID,type)" +
" as lessonTaoTi GROUP BY lessonId,taoTiID HAVING COUNT(taoTiID) >1) AND" +
" name not in (SELECT distinct whichLesson FROM tb_stuResult WHERE stuId='"+studentID+"')";