Graduate

Modify server.py

......@@ -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)
......