🐛 fix duplicate questions appearing
Co-authored-by: haraldnilsen <harald_998@hotmail.com> Signed-off-by: Sindre Kjelsrud <kjelsrudsindre@gmail.com>
This commit is contained in:
parent
c0aa51902c
commit
4bbe1ed389
1 changed files with 1 additions and 1 deletions
|
@ -44,7 +44,7 @@ func GetUserQuestions(respondentID int) ([]UserQuestions, error) {
|
|||
log.Fatalf("Error connecting to the database: %v\n", err)
|
||||
}
|
||||
|
||||
getQuestionsStatement := `SELECT s.SpørsmålID, s.tekst
|
||||
getQuestionsStatement := `SELECT DISTINCT s.SpørsmålID, s.tekst
|
||||
FROM Spørsmål s
|
||||
LEFT JOIN Spørsmålsvar ss ON s.spørsmålID = ss.spørsmålID
|
||||
LEFT JOIN SvarVurdering sv ON ss.svarID = sv.svarID AND sv.respondentID = $1
|
||||
|
|
Reference in a new issue