Skip to content

Commit 9337364

Browse files
Fixed adding and deleting a entry
1 parent 8d8065a commit 9337364

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Diff for: main.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def getInputForGameEntry():
2727
def addEntry():
2828

2929
# GL.write({name : GameEntry}, end = "\n")
30-
gameEntry = getInputForGameEntry
30+
gameEntry = getInputForGameEntry()
3131
SQLib.addVals(gameEntry)
3232

3333
def GetRating():
@@ -51,10 +51,10 @@ def UpdateRec():
5151
SQLib.updateRec(rowIDToBeUpdated, updatedInfo)
5252
print("Record Successfully updated!")
5353

54-
def DelRec():
55-
SQLib.showRowIDAndName()
54+
def DelRec():
55+
SQLib.show_all()
5656
print("Enter the rowid of the game you want to delete: ", sep="")
57-
rowIDToBeDeleted = GetIntFromUser()
57+
rowIDToBeDeleted = GetIntFromUser() #add a way to detect values out of range
5858
answer = ""
5959
print(f"Are you sure, you want to delete entry number {rowIDToBeDeleted} (y/n):", end= "\n")
6060
while answer.lower() != "y" and answer.lower() != "n": #Very important! You learnt how to implement a function that requires a correct input. First take the input, make sure its correct; then implement it.

0 commit comments

Comments
 (0)