From c8e0348f0192709f5cf58ccd09bbab7778e36c08 Mon Sep 17 00:00:00 2001 From: Georg Spar Date: Fri, 23 Jun 2023 20:26:49 +0200 Subject: [PATCH] photo db name falsch --- wdmdb.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wdmdb.go b/wdmdb.go index 26cbf1b..e7267e9 100644 --- a/wdmdb.go +++ b/wdmdb.go @@ -112,7 +112,7 @@ func CreatePhoto(pho Photos) (resPhoto Photos, err error) { log.Println("Verbindung hergestellt (Photo CREATE)") log.Println("Name = ", pho.Pfad) defer conn.Close() - res, err := conn.Exec("INSERT INTO photo VALUES(?,?,?,?)", pho.Id, pho.Pfad, pho.ItembId, pho.ItemextId) + res, err := conn.Exec("INSERT INTO photos VALUES(?,?,?,?)", pho.Id, pho.Pfad, pho.ItembId, pho.ItemextId) if err != nil { log.Println("Error while executing insert statement", err) } @@ -129,7 +129,7 @@ func DeletePhoto(phoId uint64) (result, err error) { } log.Println("DB Verbindung hergestellt (Photo DELETE)") defer conn.Close() - _, err = conn.Exec("DELETE FROM photo WHERE id = ?", phoId) + _, err = conn.Exec("DELETE FROM photos WHERE id = ?", phoId) if err != nil { log.Fatal("Error while executing DELETE statement", err) }