aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/grils/grils.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/modules/grils/grils.go b/modules/grils/grils.go
index 135398d..fbee062 100644
--- a/modules/grils/grils.go
+++ b/modules/grils/grils.go
@@ -265,10 +265,8 @@ func (m *GrilsModule) viewGril(w http.ResponseWriter, r *http.Request, p httprou
265 265
266 // ähnliche grils holen 266 // ähnliche grils holen
267 rows, err := m.g.DB.Query(`SELECT gril_id FROM ( 267 rows, err := m.g.DB.Query(`SELECT gril_id FROM (
268 SELECT DISTINCT gril_id FROM gril_appearance WHERE appearance_id IN (SELECT appearance_id FROM gril_appearance WHERE gril_id = $1) 268 SELECT DISTINCT gril_id FROM grils_appearances WHERE appearance_id IN (SELECT appearance_id FROM gril_appearance WHERE gril_id = $1)
269 ) as t 269 ) as t ORDER BY RANDOM() LIMIT 4;`, id)
270 ORDER BY RANDOM()
271 LIMIT 4;`, id)
272 if err != nil { 270 if err != nil {
273 log.Println("could not get similar grils:", err) 271 log.Println("could not get similar grils:", err)
274 http.Error(w, "500", http.StatusInternalServerError) 272 http.Error(w, "500", http.StatusInternalServerError)