mirror of
https://github.com/martinrotter/rssguard.git
synced 2025-02-02 18:36:49 +01:00
Fix LIKE statements using double quotes instead of single ones (#1481)
This commit is contained in:
parent
5224cf7391
commit
b0e2b4bb5d
@ -42,13 +42,13 @@ QMap<int, QString> DatabaseQueries::messageTableAttributes(bool only_msg_table,
|
||||
|
||||
if (is_sqlite) {
|
||||
field_names[MSG_DB_LABELS] =
|
||||
QSL("(SELECT GROUP_CONCAT(Labels.name) FROM Labels WHERE Messages.labels LIKE \"%.\" || "
|
||||
"Labels.custom_id || \".%\") as msg_labels");
|
||||
QSL("(SELECT GROUP_CONCAT(Labels.name) FROM Labels WHERE Messages.labels LIKE '%.' || "
|
||||
"Labels.custom_id || '.%') as msg_labels");
|
||||
}
|
||||
else {
|
||||
field_names[MSG_DB_LABELS] =
|
||||
QSL("(SELECT GROUP_CONCAT(Labels.name) FROM Labels WHERE Messages.labels LIKE CONCAT(\"%.\", "
|
||||
"Labels.custom_id, \".%\")) as msg_labels");
|
||||
QSL("(SELECT GROUP_CONCAT(Labels.name) FROM Labels WHERE Messages.labels LIKE CONCAT('%.', "
|
||||
"Labels.custom_id, '.%')) as msg_labels");
|
||||
}
|
||||
|
||||
field_names[MSG_DB_LABELS_IDS] = QSL("Messages.labels");
|
||||
|
@ -918,7 +918,7 @@ bool ServiceRoot::loadMessagesForItem(RootItem* item, MessagesModel* model) {
|
||||
else if (item->kind() == RootItem::Kind::Label) {
|
||||
// Show messages with particular label.
|
||||
model->setFilter(QSL("Messages.is_deleted = 0 AND Messages.is_pdeleted = 0 AND "
|
||||
"Messages.labels LIKE \"%.%2.%\" AND Messages.account_id = %1")
|
||||
"Messages.labels LIKE '%.%2.%' AND Messages.account_id = %1")
|
||||
.arg(QString::number(accountId()), item->customId()));
|
||||
}
|
||||
else if (item->kind() == RootItem::Kind::Labels) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user