summaryrefslogtreecommitdiff
path: root/plugins/Dbx_sqlite/src/dbevents.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2023-01-01 14:58:25 +0300
committerGeorge Hazan <ghazan@miranda.im>2023-01-01 14:58:25 +0300
commitf828d2569303fa4b26bee503dc9f438fd1fe0c7d (patch)
treeb931297e575f6038eb9056c03dc50b3d01606998 /plugins/Dbx_sqlite/src/dbevents.cpp
parentb453b95cae4275f3f79ef229bed8e337a6b58f83 (diff)
fixes #3290 completely + fix for the database checker
Diffstat (limited to 'plugins/Dbx_sqlite/src/dbevents.cpp')
-rw-r--r--plugins/Dbx_sqlite/src/dbevents.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/Dbx_sqlite/src/dbevents.cpp b/plugins/Dbx_sqlite/src/dbevents.cpp
index cd844c9089..433cae1852 100644
--- a/plugins/Dbx_sqlite/src/dbevents.cpp
+++ b/plugins/Dbx_sqlite/src/dbevents.cpp
@@ -231,8 +231,8 @@ BOOL CDbxSQLite::EditEvent(MCONTACT hContact, MEVENT hDbEvent, const DBEVENTINFO
sqlite3_bind_int(stmt, 3, tmp.eventType);
sqlite3_bind_int64(stmt, 4, tmp.flags);
sqlite3_bind_blob(stmt, 5, tmp.pBlob, tmp.cbBlob, nullptr);
- sqlite3_bind_int64(stmt, 6, hDbEvent);
- sqlite3_bind_int(stmt, 7, tmp.markedRead());
+ sqlite3_bind_int(stmt, 6, tmp.markedRead());
+ sqlite3_bind_int64(stmt, 7, hDbEvent);
int rc = sqlite3_step(stmt);
logError(rc, __FILE__, __LINE__);
sqlite3_reset(stmt);
@@ -342,7 +342,7 @@ BOOL CDbxSQLite::MarkEventRead(MCONTACT hContact, MEVENT hDbEvent)
int rows;
{
mir_cslock lock(m_csDbAccess);
- sqlite3_stmt *stmt = InitQuery("UPDATE events SET flags = flags OR 4, is_read = 1 WHERE id = ? AND is_read = 0;", qEvSetFlags);
+ sqlite3_stmt *stmt = InitQuery("UPDATE events SET flags = flags | 4, is_read = 1 WHERE id = ? AND is_read = 0;", qEvSetFlags);
sqlite3_bind_int64(stmt, 1, hDbEvent);
int rc = sqlite3_step(stmt);
rows = sqlite3_changes(m_db);