Graduate

Update rowcount method

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