aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrtz12 <koenig@fagott.pw>2016-10-09 19:27:30 (UTC)
committerrtz12 <koenig@fagott.pw>2016-10-09 19:27:30 (UTC)
commit82385f50d12492bd980b6f88a138a8821f597efd (patch)
tree757d49bf9eb404f7e0f98eaa31d04b3eed9b173c
parent2883e99f02a3262fcdaf74bf34c70e76a507a017 (diff)
Tabelle wurde umbenannt
-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)