Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2020-1-capstone-design1
/
KHY_Project1
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
Graduate
2020-06-09 15:21:33 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
858716907c8752720ffe0c83a074f438dd1abf20
85871690
1 parent
58be6cdb
Modify server.py
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletions
server/server.py
server/server.py
View file @
8587169
...
...
@@ -92,7 +92,8 @@ async def thread(websocket, path):
if
not
cursor
.
fetchone
():
sql
=
"INSERT INTO student(student_id, student_name) VALUES (
%
s,
%
s)"
cursor
.
execute
(
sql
,
(
student_id
,
student_name
))
attendance_db
.
commit
()
sql
=
"INSERT INTO lecture_students(lecture_id, student_id) VALUES (
%
s,
%
s)"
cursor
.
execute
(
sql
,
(
'0'
,
student_id
))
msg
=
'[{ip}] {id} is registered'
.
format
(
ip
=
remote_ip
,
id
=
student_id
)
print
(
msg
)
...
...
Please
register
or
login
to post a comment