diff options
author | flavio <fdanesse@gmail.com> | 2012-04-16 21:08:13 (GMT) |
---|---|---|
committer | flavio <fdanesse@gmail.com> | 2012-04-16 21:08:13 (GMT) |
commit | e688feec9fb9691662476700a7d1f5596a1eb444 (patch) | |
tree | a398cef809fdd7ef435e63f5476616dc6e93d158 /store.py | |
parent | f717b4e99b57e6d87ec4d7ba2a58c92989a95c28 (diff) |
Correcciones en consultas para devoluciĆ³n de registro completo y agregado de campo fav en treview.
Diffstat (limited to 'store.py')
-rw-r--r-- | store.py | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -48,7 +48,7 @@ CREATE TABLE IF NOT EXISTS notifications (id INTEGER PRIMARY KEY,title VARCHAR(3 c = con.cursor() c.execute('BEGIN TRANSACTION') try: - c.execute('insert into notifications(%s,%s,%s,%s,%s,%s,%s) values (?,?,?,?,?,?,?)' %tuple(keys), values) + c.execute('insert into notifications(%s,%s,%s,%s,%s,%s,%s,%s) values (?,?,?,?,?,?,?,?)' %tuple(keys), values) except sqlite3.IntegrityError,e: print "Error al insertar datos: %s" %str(e) c.execute('END TRANSACTION') @@ -110,7 +110,7 @@ CREATE TABLE IF NOT EXISTS notifications (id INTEGER PRIMARY KEY,title VARCHAR(3 filters+=' and ' if args else '' c = con.cursor() c.execute('BEGIN TRANSACTION') - c.execute('SELECT title, text, type, launched, expires FROM notifications %s order by priority desc;' %filters) + c.execute('SELECT id, priority, title, text, launched, expires, type, fav FROM notifications %s order by priority desc;' %filters) output = c.fetchall() c.execute('END TRANSACTION') self._close_connection(con) |