Skip to content

Commit

Permalink
move database file to root
Browse files Browse the repository at this point in the history
  • Loading branch information
Hubert Lee committed Oct 13, 2012
1 parent 7f95534 commit c89c00f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions utils/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def setup_db():
con = sqlite3.connect('vocably.db')

with con:
cur = con.cursor()
cur = con.cursor()

cur.execute("SELECT * FROM sqlite_master WHERE type='table' AND name='Users';")
rows = cur.fetchall()
Expand Down Expand Up @@ -68,7 +68,7 @@ def get_score(email):
con = sqlite3.connect('vocably.db')

with con:
cur = con.cursor()
cur = con.cursor()
query = 'SELECT score FROM Users WHERE email="'+email+'";'
cur.execute(query)
rows = cur.fetchall()
Expand All @@ -78,7 +78,7 @@ def store_user_words(email,words):
con = sqlite3.connect('vocably.db')

with con:
cur = con.cursor()
cur = con.cursor()

for word in words:
query = 'INSERT INTO Vocab VALUES("'
Expand All @@ -93,7 +93,7 @@ def wipe_db():
if not os.path.isfile("vocably.db"):
print "The database is not there to begin with!"
return

msg = "Are you 100% sure you want to wipe the database?\n"
msg += "This will remote all data and is irreversible... (yes/no)\n"
input_ = raw_input(msg).strip().lower()
Expand Down
Binary file removed utils/vocably.db
Binary file not shown.
Binary file added vocably.db
Binary file not shown.

0 comments on commit c89c00f

Please sign in to comment.