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()