1.数据库建立
CREATE DATABASE database_cs
2.建立课程表
create table Info_course (Course_id varchar(50) not null,
Course_name varchar(50) not null,
Teacher_name varchar(50) not null,
Teacher_id varchar(50) not null,
CollectedMan int,
Capacity int,
Course_time varchar(50),
Course_place varchar(50),
credit float
primary key (Course_id));
3.建立学生信息表
create table Info_student(Student_name varchar(50) not null,
Student_id varchar(50) not null,
Dept varchar(50) ,
Major varchar(50),
sex char(4) ,
class varchar(50),
password varchar(50),
primary key (Student_id));
4.建立教师信息表
create table Info_teac(Teacher_name varchar(50) not null,
Teacher_id varchar(50) not null,
Dept varchar(50) ,
sex char(4) ,
Zhicheng varchar(50),
password varchar(50),
primary key (Teacher_id));
5.建立管理员信息表
create table Info_admin( Admin_no varchar(50) not null,
Admin_name varchar(50) not null,
password varchar(50),
primary key (Admin_no));
6.建立选课表
create table selected(Stu_name varchar(50) not null,
Stu_id varchar(50) not null,
Dept varchar(50) ,
class varchar(50),
Major varchar(50),
Course_name varchar(50),
Course_id varchar(50),
primary key (Course_id,Stu_id));
6.输入课程信息
insert into Info_course values(' ',' ',' ',' ', , ,' ',' ', );
7.输入学生信息
insert into Info_student values(' ',' ',' ',' ', , ,' ',' ', );
7.输入管理员信息
insert into Info_admin values('1','justin','163122',);
8.插入选课信息
insert into selected(Stu_id,Stu_name,Dept,Major,class,Course_name,Course_id)
select s.Student_id,s.Student_name,s.Dept,s.Major,s.class,c.Course_name,c.Course_id
from Info_student s ,Info_course c
where s.Student_id='24'and c.Course_id='001';
8.查询某学生的全部已选课信息(学号为xx)
select cs.Course_id,cs.Course_name,c.Teacher_name,c.Course_time,c.Course_place,c.credit
from selected cs,Info_course c
where cs.Stu_id='xx'and cs.Course_id=c.Course_id;
查询学生可选课程名单
select *
from Info_course c
where c.CollectedMan<c.Capacity
9.查询某教师的公布课程情况
select *
from info_course c,
where c.Teacher_id='xx'
10.查询某教师的某课堂的学生名单
select Stu_name,Stu_id,Dept,Major,class
from selected cs
where Course_id='001'
11.修改学生信息
update Info_student
set
where Info_student.Student_id='xx';
12.修改课程信息表
update Info_course
set
where Info_course.Course_id='xx';
13.修改教师信息表
update Info_Teacher
set
where Info_Teacher.Teacher_id='xx';
14.修改管理员信息表
update Info_admin
set
where Info_admin.admin_no='xx';
15.删除学生信息
delete
from Info_Student s
where s.Student_id='xx';
16.删除教师信息
delete
from Info_Teacher t
where t.teacher_id='xx';
17.删除课程信息
delete
from Info_Course c
where c.Course_id='xx';
18.删除选课信息
delete
from selected cs
where cs.Student_id='xx'and cs.Course_id='xx';
19.删除管理员表信息
delete
from Info_admin
where admin_no='xx';
没有合适的资源?快使用搜索试试~ 我知道了~
php选课系统.zip
共104个文件
php:41个
bak:23个
png:16个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 106 浏览量
2022-04-08
23:24:31
上传
评论 1
收藏 1.31MB ZIP 举报
温馨提示
php+mysql,含有数据库脚本。
资源推荐
资源详情
资源评论
收起资源包目录
php选课系统.zip (104个子文件)
config.php.bak 6KB
install.php.bak 4KB
login.php.bak 4KB
login1.php.bak 3KB
add.php.bak 3KB
regist.php.bak 2KB
navi2.php.bak 2KB
addcourse.php.bak 2KB
navi.php.bak 2KB
UploadCourse.php.bak 2KB
teachaxun.php.bak 1KB
courseselect.php.bak 1KB
index.php.bak 1KB
selectCourse.php.bak 1KB
chaxun.php.bak 1KB
form_test.php.bak 838B
studentLog.php.bak 722B
teacherLog.php.bak 685B
head.php.bak 518B
try.php.bak 432B
delete.php.bak 292B
logoff.php.bak 164B
selectedsuc.php.bak 35B
表.doc 62KB
Flower.gif 7KB
Flower.gif 7KB
Citrus.gif 2KB
Citrus.gif 2KB
Birthday.gif 726B
Birthday.gif 726B
mu_logout.gif 307B
mu_logout.gif 307B
Untitled-3.htm 6KB
03.jpg 35KB
03.jpg 35KB
11503306880828763.jpg 29KB
lin1.jpg 24KB
lin1.jpg 24KB
lin.jpg 19KB
lin.jpg 19KB
Gathering.jpg 12KB
Gathering.jpg 12KB
Clear.jpg 6KB
Clear.jpg 6KB
Fiesta.jpg 5KB
Fiesta.jpg 5KB
config.php 6KB
navi2.php 4KB
navi.php 4KB
signup.php 4KB
install.php 4KB
login.php 4KB
add.php 3KB
regist.php 2KB
regist.php 2KB
navi2.php 2KB
navi3.php 2KB
addcourse.php 2KB
signsuc.php 2KB
addcourse.php 2KB
navi.php 2KB
UploadCourse.php 2KB
chaxun.php 2KB
course.php 1KB
course.php 1KB
teachaxun.php 1KB
student.php 1KB
index.php 1KB
courseselect.php 1KB
chaxun.php 1KB
selectCourse.php 1KB
teacherLog.php 685B
AdminLog.php 685B
studentLog.php 684B
teacherLog.php 683B
studentLog.php 680B
head.php 518B
logon.php 509B
head.php 460B
try.php 450B
delete.php 292B
main.php 271B
main.php 271B
logoff.php 165B
index.php 49B
selectedsuc.php 35B
uploadsuc.php 35B
Gathering2.png 315KB
Gathering2.png 315KB
logout.png 36KB
logout.png 36KB
chaxun.png 35KB
chaxun.png 35KB
fabu.png 35KB
fabu.png 35KB
xuanke.png 35KB
xuanke.png 35KB
xuanke(purple).png 30KB
xuanke(purple).png 30KB
Birthday.png 26KB
共 104 条
- 1
- 2
资源评论
等天晴i
- 粉丝: 2882
- 资源: 10万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 基于JavaScript的访客预约系统设计源码
- 基于Vue和ECharts的工作租房数据可视化系统设计源码
- 1040g0cg310ravpiu6ibg5pg00tsipsln3ju2d0g 2
- 基于Python的SAR图像去噪CNN-NLM设计源码
- redhat6升级到redhat7,过程redhat6.x-> redhat6.10->rehat7.9 主版本最高版本
- 基于Django的流程引擎设计源码
- 基于Node.js的Express框架与MySQL的后台管理系统设计源码
- 基于Java的Flink流批一体数据处理快速集成开发框架设计源码
- FirstFilterOrderCompare
- Screenshot_2024-03-28-19-17-25-020_com.ss.android.lark.jpg
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功