Skip to content

Commit

Permalink
Updates PhoneBook.py. (Minor Bugs Fixed)
Browse files Browse the repository at this point in the history
Fixed some small bugs.
  • Loading branch information
ayushjain01 authored Jan 1, 2021
1 parent 731f2c4 commit cce003d
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions PhoneBook.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,9 +235,9 @@ def save():

root = Tk()
con = sqlite3.connect("Contact.db")
'''

cur = con.cursor()
cur.execute("""CREATE TABLE CONTACTS_TABLE(
cur.execute("""CREATE TABLE IF NOT EXISTS CONTACTS_TABLE(
First_Name varchar(50),
Last_Name varchar(50),
Mobile_Number int PRIMARY KEY,
Expand All @@ -247,5 +247,10 @@ def save():
Notes longtext)
"""
)
'''
cur.execute("DELETE FROM CONTACTS_TABLE")
cur.execute("""INSERT INTO CONTACTS_TABLE VALUES
("Test1","Test1",987642212,12345678,"test1@test1.com","@test1","A Test Contact Card."),
("Test2","Test2",987643312,12343378,"test2@test2.com","@test2","A Test Contact Card.")
""")
cur = PhoneBook(root, con)

0 comments on commit cce003d

Please sign in to comment.