|
|
|
@ -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) |
|
|
|
|
} |
|
|
|
|