From 033d9ae9486861e99a420b84b5645c912d1613ff Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 23 Nov 2005 00:22:59 +0000 Subject: and yet another db fix git-svn-id: file:///home/lennart/svn/public/sse/trunk@30 5fbabb74-0606-0410-a5e4-b5cc6a42724e --- feed/sse_db.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'feed/sse_db.py') diff --git a/feed/sse_db.py b/feed/sse_db.py index 14c3bf2..16b07c7 100644 --- a/feed/sse_db.py +++ b/feed/sse_db.py @@ -70,5 +70,5 @@ def new_word(file_id, text, is_subword): else: t = "word" - cursor.execute('INSERT IGNORE INTO word (text, type, crawler_id, file_id, cnt) VALUES (%s, %s, %s, %s, 0)', (text, t, crawler_id, file_id)) - cursor.execute('UPDATE word SET cnt=cnt+1 WHERE text=%s AND type=%s AND crawler_id=%s AND file_id=%s', (text, t, crawler_id, file_id)) + cursor.execute('INSERT IGNORE INTO word (text, type, crawler_id, file_id, cnt) VALUES (%s, %s, %s, %s, 0)', (text, t, file_id[0], file_id[1])) + cursor.execute('UPDATE word SET cnt=cnt+1 WHERE text=%s AND type=%s AND crawler_id=%s AND file_id=%s', (text, t, file_id[0], file_id[1])) -- cgit