summaryrefslogtreecommitdiffstats
path: root/feed/sse_db.py
diff options
context:
space:
mode:
Diffstat (limited to 'feed/sse_db.py')
-rw-r--r--feed/sse_db.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/feed/sse_db.py b/feed/sse_db.py
index 4cf2af3..e99c5d0 100644
--- a/feed/sse_db.py
+++ b/feed/sse_db.py
@@ -3,7 +3,6 @@ import sys, os, MySQLdb, stat
db = MySQLdb.connect(host = "localhost", user = "sse_web", passwd = "ece6Yoli", db = "sse")
cursor = db.cursor();
-cursor.execute("SET AUTOCOMMIT=0")
def commit():
cursor.execute('COMMIT')
@@ -70,6 +69,6 @@ def new_word(file_id, text, is_subword):
t = "subword"
else:
t = "word"
-
+
cursor.execute('INSERT IGNORE INTO word (text, type, file_id, cnt) VALUES (%s, %s, %s, 0)', (text, t, file_id))
cursor.execute('UPDATE word SET cnt=cnt+1 WHERE text=%s AND type=%s AND file_id=%s', (text, t, file_id))