Graduate

Update rowcount method

......@@ -4,9 +4,9 @@
# Team
- 정해갑(컴퓨터공학과, 2014104149)
# Usage
## 추가 예정
- ....
# Environment
## Server
- AWS
# Demo
## Register
......
[server]
uri=ws://localhost:3000
uri=ws://13.124.104.70:3000
[register]
taking_time=0.2
image_size=160
......
wheel
tensorflow==1.14
opencv-python==4.1.1.26
websockets
......
......@@ -73,9 +73,9 @@ async def thread(websocket, path):
student_name = data['student_name']
# 학생을 찾음
sql = "SELECT student_id FROM student WHERE student_id = %s;"
rows_count = cursor.execute(sql, (student_id))
cursor.execute(sql, (student_id))
# DB에 학생이 없으면 등록
if rows_count == 0:
if cursor.rowcount == 0:
sql = "INSERT INTO student(student_id, student_name) VALUES (%s, %s)"
cursor.execute(sql, (student_id, student_name))
sql = "INSERT INTO lecture_students(lecture_id, student_id) VALUES (%s, %s)"
......