From 2b119f6752a7a5f849172acf3083976efe86e702 Mon Sep 17 00:00:00 2001 From: Jason Streifling Date: Sun, 8 Oct 2023 15:16:47 +0200 Subject: [PATCH] =?UTF-8?q?Leerzeichen=20in=20SQL-Abfragen=20erg=C3=A4nzt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/db/db.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/db/db.go b/packages/db/db.go index 5596aa4..802436b 100644 --- a/packages/db/db.go +++ b/packages/db/db.go @@ -69,18 +69,18 @@ func Open(dbName string) (*DB, error) { func (db *DB) WriteBriefing(b *types.Briefing) error { for i := 0; i < len(b.Participants); i++ { result, err := db.Exec("INSERT INTO "+db.Name+" (instructor_first,"+ - "instructor_last, date, time, state, location, participant_first,"+ - "participant_last, company) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)", + " instructor_last, date, time, state, location, participant_first,"+ + " participant_last, company) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)", b.FirstName, b.LastName, b.Date, b.Time, b.State, b.Location, b.Participants[i].FirstName, b.Participants[i].LastName, b.Participants[i].Company) if err != nil { return fmt.Errorf("*DB.WriteBriefing: db.Exec(\"INSERT INTO"+ - "\"+db.Name+\" (instructor_first, instructor_last, date, time, state,"+ - "location, participant_first, participant_last, company) VALUES (?, ?,"+ - "?, ?, ?, ?, ?, ?, ?)\", b.FirstName, b.LastName, b.Date, b.Time,"+ - "b.State, b.Location, b.Participants[i].FirstName,"+ - "b.Participants[i].LastName, b.Participants[i].Company): %v\n", err) + " \"+db.Name+\" (instructor_first, instructor_last, date, time, state,"+ + " location, participant_first, participant_last, company) VALUES (?, ?,"+ + " ?, ?, ?, ?, ?, ?, ?)\", b.FirstName, b.LastName, b.Date, b.Time,"+ + " b.State, b.Location, b.Participants[i].FirstName,"+ + " b.Participants[i].LastName, b.Participants[i].Company): %v\n", err) } _, err = result.LastInsertId()