-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix not being able to add people and added register_staff to add more people
- Loading branch information
Showing
3 changed files
with
55 additions
and
39 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import sqlite3 | ||
|
||
#Opening connection to database. | ||
facedb = sqlite3.connect('attendance.db') | ||
cur = facedb.cursor() | ||
|
||
#taking image url and staff ID/ index number from user | ||
image_name = input("Enter image name and directory like 'img/1.jpg' : ") | ||
staff_id = int(input("Enter staff id number: ")) | ||
name = input("Enter name of staff: ") | ||
encoded = input("Enter encoded name to give: ") | ||
|
||
cur.execute("INSERT INTO staff VALUES (?, ?, ?, ?)", (staff_id, name, image_name, encoded)) | ||
#Saving changes to database | ||
facedb.commit() | ||
|
||
facedb.close() | ||
print("Sucess!") |