package stuman;
import java.sql.*;
public class determine{
public ResultSet getClass(String tea_id){
String sql="select classes.id,course.name "+
"from classes,course "+
"where course.id=classes.cour_id "+
"and classes.tea_id='"+tea_id+"' ";
sqlBean sqlbean = new sqlBean();
ResultSet rs = sqlbean.executeQuery(sql);
return rs;
}
public ResultSet getStudents(String class_id){
String sql="select student.id,name ,department,sex,mark,e_mail,tel "+
"from student,enrol,classes "+
"where student.id=enrol.stu_id "+
"and enrol.accept='0' "+
"and classes.id=enrol.class_id "+
"and classes.id='"+class_id+"' ";
sqlBean sqlbean = new sqlBean();
ResultSet rs = sqlbean.executeQuery(sql);
return rs;
}
public ResultSet getStudents2(String class_id){
String sql="select student.id,name ,department,sex,mark,e_mail,tel "+
"from student,enrol,classes "+
"where student.id=enrol.stu_id "+
"and enrol.accept='1' "+
"and enrol.score='0' "+
"and classes.id=enrol.class_id "+
"and classes.id='"+class_id+"' ";
sqlBean sqlbean = new sqlBean();
ResultSet rs = sqlbean.executeQuery(sql);
return rs;
}
public int enrol(String stu_id,String class_id){
int num=0;
String sql="update enrol set accept=1 "+
"where stu_id='"+stu_id+"' "+
"and class_id='"+class_id+"' ";
sqlBean db = new sqlBean();
num=db.executeInsert(sql);
return num;
}
public int marking(String stu_id,String class_id,String score){
int num=0;
String sql="update enrol "+
"set score='"+score+"' "+
"where stu_id='"+stu_id+"' "+
"and class_id='"+class_id+"' ";
sqlBean db = new sqlBean();
num=db.executeInsert(sql);
return num;
}
public int addMark(String stu_id,String class_id){
int num=0;
String sql="update student "+
"set student.mark=course.mark "+
"from student,course,classes "+
"where student.id='"+stu_id+"' "+
"and course.id=classes.cour_id "+
"and classes.id='"+class_id+"' ";
sqlBean db = new sqlBean();
num=db.executeInsert(sql);
return num;
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
jsp写的学生选课信息管理系统,附带写好的毕业论文,可用于毕业设计。(SP(全称JavaServer Pages)是由Sun Microsystems公司主导创建的一种动态网页技术标准。JSP部署于网络服务器上,可以响应客户端发送的请求,并根据请求内容动态地生成HTML、XML或其他格式文档的Web网页,然后返回给请求者。JSP技术以Java语言作为脚本语言,为用户的HTTP请求提供服务,并能与服务器上的其它Java程序共同处理复杂的业务需求)
资源推荐
资源详情
资源评论

















收起资源包目录





































































































共 100 条
- 1
资源评论

- 峰子哥哥2021-12-06不是mysql
- ck117121382020-06-23可以是可以,主要是本人用Myeclipse,所以还是有些出入,但总体还是不错的
ConeyLa
- 粉丝: 3
- 资源: 2

上传资源 快速赚钱
我的内容管理 收起
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助

会员权益专享
安全验证
文档复制为VIP权益,开通VIP直接复制
