Changeset 7829 for branches/gajim_0.11/src/common/logger.py
- Timestamp:
- 01/13/07 23:35:41 (23 months ago)
- Files:
-
- 1 modified
-
branches/gajim_0.11/src/common/logger.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/gajim_0.11/src/common/logger.py
r7787 r7829 426 426 self.cur.execute(''' 427 427 SELECT time, kind, message FROM logs 428 WHERE (%s) AND kind IN (%d, %d, %d, %d ) AND time > %d428 WHERE (%s) AND kind IN (%d, %d, %d, %d, %d) AND time > %d 429 429 ORDER BY time DESC LIMIT %d OFFSET %d 430 ''' % (where_sql, constants.KIND_SINGLE_MSG_RECV, constants.KIND_CHAT_MSG_RECV, 431 constants.KIND_SINGLE_MSG_SENT, constants.KIND_CHAT_MSG_SENT, 430 ''' % (where_sql, constants.KIND_SINGLE_MSG_RECV, 431 constants.KIND_CHAT_MSG_RECV, constants.KIND_SINGLE_MSG_SENT, 432 constants.KIND_CHAT_MSG_SENT, constants.KIND_ERROR, 432 433 timed_out, restore_how_many_rows, pending_how_many) 433 434 ) … … 516 517 result = self.cur.fetchall() 517 518 518 # Copy all interes ant timein a temporary table519 # Copy all interesting times in a temporary table 519 520 self.cur.execute('CREATE TEMPORARY TABLE blabla(time,INTEGER)') 520 521 for line in result: … … 555 556 where_sql = 'jid_id = %s' % jid_id 556 557 self.cur.execute(''' 557 SELECT timeFROM logs558 SELECT MAX(time) FROM logs 558 559 WHERE (%s) 559 560 AND kind NOT IN (%d, %d) 560 ORDER BY time DESC LIMIT 1561 561 ''' % (where_sql, constants.KIND_STATUS, constants.KIND_GCSTATUS)) 562 562
