summaryrefslogtreecommitdiff
path: root/plugins/Dbx_sqlite/src/dbcontacts.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2024-05-19 20:48:04 +0300
committerGeorge Hazan <george.hazan@gmail.com>2024-05-19 20:48:04 +0300
commit912e59a43a47536a0f6609d1b1bfe2a4253746cd (patch)
tree6f694d1f4d7ad19af4b4df285fba34b47939e559 /plugins/Dbx_sqlite/src/dbcontacts.cpp
parent900159ffb248bf727eb648b6da25d5f537d3c64b (diff)
fixes #4431 (NewStory: в заголовке системной истории отсутствует количество событий)
Diffstat (limited to 'plugins/Dbx_sqlite/src/dbcontacts.cpp')
-rw-r--r--plugins/Dbx_sqlite/src/dbcontacts.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/Dbx_sqlite/src/dbcontacts.cpp b/plugins/Dbx_sqlite/src/dbcontacts.cpp
index f66e5840e8..407f643a81 100644
--- a/plugins/Dbx_sqlite/src/dbcontacts.cpp
+++ b/plugins/Dbx_sqlite/src/dbcontacts.cpp
@@ -3,7 +3,7 @@
void CDbxSQLite::InitContacts()
{
sqlite3_stmt *stmt = nullptr;
- sqlite3_prepare_v2(m_db, "SELECT contacts.id, COUNT(es.id) FROM contacts LEFT JOIN events_srt es ON es.contact_id = contacts.id GROUP BY contacts.id;", -1, &stmt, nullptr);
+ sqlite3_prepare_v2(m_db, "SELECT contact_id, COUNT(id) FROM events_srt GROUP BY contact_id;", -1, &stmt, nullptr);
int rc = 0;
while ((rc = sqlite3_step(stmt)) == SQLITE_ROW) {
MCONTACT hContact = sqlite3_column_int64(stmt, 0);