From 84b8366e5b3027ccd74622b7e6a271f5c7a641fa Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 22 Nov 2005 00:06:03 +0000 Subject: lots of small fixes git-svn-id: file:///home/lennart/svn/public/sse/trunk@19 5fbabb74-0606-0410-a5e4-b5cc6a42724e --- feed/sse_db.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'feed/sse_db.py') 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)) -- cgit