"select course.cou_id,cou_name,cou_day,cou_time,course.xuefen,courseinfo.teacher"+
"from course,courseinfo,grade where grade.stu_id='"+stu_id+"'" +//引号里的stu_id是一个变量
"and grade.cou_id=course.cou_id and "+
"grade.cou_id=courseinfo.cou_id and grade.isdual=0";
------解决思路----------------------
"select course.cou_id,cou_name,cou_day,cou_time,course.xuefen,courseinfo.teacher "+这边加个空格
"from course,courseinfo,grade where grade.stu_id='"+stu_id+"'" +//引号里的stu_id是一个变量
"and grade.cou_id=course.cou_id and "+
"grade.cou_id=courseinfo.cou_id and grade.isdual=0";
courseinfo.teacher后面加个空格
------解决思路----------------------
"select course.cou_id,cou_name,cou_day,cou_time,course.xuefen,courseinfo.teacher"+
"from course,courseinfo,grade where grade.stu_id='"+stu_id+"'" +//引号里的stu_id是一个变量 --其他语言执行的吧,stu_id是变量的话要加@stu_id,如果是字段引用,多张表查询防止 字段在多个表中重复出现可以加上 表名.stu_id
"and grade.cou_id=course.cou_id and "+
"grade.cou_id=courseinfo.cou_id and grade.isdual=0";