diff --git a/packages/data/dbFuncs.go b/packages/data/dbFuncs.go index 2fa4d0e..cc80fc8 100644 --- a/packages/data/dbFuncs.go +++ b/packages/data/dbFuncs.go @@ -169,14 +169,18 @@ func (db *DB) GetOverviewTableDataByName(n string) ([]OverviewTableData, error) ON b.id = g.briefing_id INNER JOIN participants AS p ON p.id = g.participant_id + INNER JOIN questions AS q + ON q.id = g.question_id INNER JOIN instructors AS i ON i.id = b.instructor_id WHERE q.id = 1 AND - i.first_name LIKE ? OR - i.last_name LIKE ? OR - p.first_name LIKE ? OR - p.last_name LIKE ? + ( + i.first_name LIKE ? OR + i.last_name LIKE ? OR + p.first_name LIKE ? OR + p.last_name LIKE ? + ) ORDER BY b.id DESC, p.id diff --git a/packages/session/handlerFuncs.go b/packages/session/handlerFuncs.go index ef6c4dd..8398b36 100644 --- a/packages/session/handlerFuncs.go +++ b/packages/session/handlerFuncs.go @@ -46,7 +46,6 @@ func HandleInternalLogin(db *data.DB, ss *[]*Session, cs chan<- *Session) http.H func (s *Session) HandleSearch(db *data.DB) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { - log.Println("hier") var err error data := tableHTMLData{} diff --git a/templates/table.html b/templates/table.html index 2d2bf9f..173d179 100644 --- a/templates/table.html +++ b/templates/table.html @@ -18,7 +18,8 @@ {{define "content"}}
- +