This commit is contained in:
Martin Rotter 2023-06-09 11:41:20 +02:00
parent 30a471a6fe
commit f9dd00df84
1 changed files with 2 additions and 2 deletions

View File

@ -665,7 +665,7 @@ QMap<QString, ArticleCounts> DatabaseQueries::getMessageCountsForAllLabels(const
if (db.driverName() == QSL(APP_DB_MYSQL_DRIVER)) {
q.prepare(QSL("SELECT l.custom_id, CONCAT('%.', l.id,'.%') pid, SUM(m.is_read), COUNT(*) FROM Labels l "
"INNER JOIN Messages m "
" ON m.labels LIKE pid "
" ON m.account_id = l.account_id AND m.labels LIKE pid "
"WHERE "
" m.is_deleted = 0 AND "
" m.is_pdeleted = 0 AND "
@ -675,7 +675,7 @@ QMap<QString, ArticleCounts> DatabaseQueries::getMessageCountsForAllLabels(const
else {
q.prepare(QSL("SELECT l.custom_id, ('%.' || l.id || '.%') pid, SUM(m.is_read), COUNT(*) FROM Labels l "
"INNER JOIN Messages m "
" ON m.labels LIKE pid "
" ON m.account_id = l.account_id AND m.labels LIKE pid "
"WHERE "
" m.is_deleted = 0 AND "
" m.is_pdeleted = 0 AND "