Skip to content

Server.py changes #20

Open
abdullahw1 wants to merge 2 commits into
H2Shami:mainfrom
abdullahw1:server
Open

Server.py changes #20
abdullahw1 wants to merge 2 commits into
H2Shami:mainfrom
abdullahw1:server

Conversation

@abdullahw1
Copy link
Copy Markdown

No description provided.

Comment thread src/pages/api/server.py
cur = conn.cursor()
cur.execute(
f"INSERT INTO attendance (classid, studentid, entry_timestamp) VALUES ('{class_id}', '{student_id}', '{timestamp}');"
f"INSERT INTO attendance (attendanceid, classid, studentid, entry_timestamp) VALUES ('{attendanceid}', '{class_id}', '{student_id}', '{timestamp}');"
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We shouldn't need to manually add the attendanceID. The ID should auto increment based on the db. The risk with manually adding it instead of using the db is that we may enter an ID with the same ID

Copy link
Copy Markdown
Owner

@H2Shami H2Shami left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

left a comment for change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants