diff OrthancServer/Sources/Database/SQLiteDatabaseWrapper.cpp @ 5256:261ce0ed85e6 db-protobuf

fix
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 11 Apr 2023 20:50:43 +0200
parents f22c8fac764b
children 176bc05f85f4 48b8dae6dc77
line wrap: on
line diff
--- a/OrthancServer/Sources/Database/SQLiteDatabaseWrapper.cpp	Tue Apr 11 16:28:28 2023 +0200
+++ b/OrthancServer/Sources/Database/SQLiteDatabaseWrapper.cpp	Tue Apr 11 20:50:43 2023 +0200
@@ -1084,7 +1084,7 @@
       }
       else
       {
-        SQLite::Statement s(db_, SQLITE_FROM_HERE, "INSERT OR IGNORE INTO Labels (internalId, label) VALUES(?, ?)");
+        SQLite::Statement s(db_, SQLITE_FROM_HERE, "INSERT OR IGNORE INTO Labels (id, label) VALUES(?, ?)");
         s.BindInt64(0, resource);
         s.BindString(1, label);
         s.Run();
@@ -1101,7 +1101,7 @@
       }
       else
       {
-        SQLite::Statement s(db_, SQLITE_FROM_HERE, "DELETE FROM Labels WHERE internalId=? AND label=?");
+        SQLite::Statement s(db_, SQLITE_FROM_HERE, "DELETE FROM Labels WHERE id=? AND label=?");
         s.BindInt64(0, resource);
         s.BindString(1, label);
         s.Run();
@@ -1115,7 +1115,7 @@
       target.clear();
 
       SQLite::Statement s(db_, SQLITE_FROM_HERE, 
-                          "SELECT label FROM Labels WHERE internalId=?");
+                          "SELECT label FROM Labels WHERE id=?");
       s.BindInt64(0, resource);
 
       while (s.Step())