CategoryDaoSqlite: deleteCategory(): Fix broken query

This commit is contained in:
Albert S. 2021-10-12 20:10:18 +02:00
parent 420e541e75
commit eb292a7d79
1 changed files with 3 additions and 3 deletions

View File

@ -64,9 +64,9 @@ void CategoryDaoSqlite::deleteCategory(std::string name)
try try
{ {
*db << "BEGIN"; *db << "BEGIN;";
*db << "DELETE FROM categorymember WHERE catid = (SELECT id FROM category WHERE name = ?)" << name; *db << "DELETE FROM categorymember WHERE category = (SELECT id FROM category WHERE name = ?);" << name;
*db << "DELETE FROM category WHERE name = ?" << name; *db << "DELETE FROM category WHERE name = ?;" << name;
*db << "COMMIT;"; *db << "COMMIT;";
} }
catch(sqlite::sqlite_exception &e) catch(sqlite::sqlite_exception &e)