Fix puzzles tags in admin routes
This commit is contained in:
parent
15f0791777
commit
f6d2d7f96f
1 changed files with 2 additions and 2 deletions
|
@ -101,8 +101,8 @@ public enum DatabaseQuery {
|
|||
ADD_PUZZLE("INSERT INTO puzzles (name, content, soluce, verify, score_max, fk_chapter) VALUES (?,?,?,?,?,?)"),
|
||||
DELETE_PUZZLE("DELETE FROM puzzles WHERE id_puzzle = ?"),
|
||||
EDIT_PUZZLE("UPDATE puzzles SET name = ?, content = ?, soluce = ?, verify = ?, score_max = ?, fk_chapter = ? WHERE id_puzzle = ?"),
|
||||
GET_PUZZLE("SELECT * FROM puzzles p LEFT JOIN containsTags ct ON ct.fk_puzzle = p.id_puzzle LEFT JOIN tags t ON t.id_tag = ct.fk_tag WHERE p.id_puzzle = ?"),
|
||||
GET_PUZZLES("SELECT * FROM puzzles p LEFT JOIN containsTags ct ON ct.fk_puzzle = p.id_puzzle LEFT JOIN tags t ON t.id_tag = ct.fk_tag"),
|
||||
GET_PUZZLE("SELECT p.*, GROUP_CONCAT(t.name) AS tags FROM puzzles p LEFT JOIN containsTags ct ON ct.fk_puzzle = p.id_puzzle LEFT JOIN tags t ON t.id_tag = ct.fk_tag WHERE p.id_puzzle = ? GROUP BY p.id_puzzle"),
|
||||
GET_PUZZLES("SELECT p.*, GROUP_CONCAT(t.name) AS tags FROM puzzles p LEFT JOIN containsTags ct ON ct.fk_puzzle = p.id_puzzle LEFT JOIN tags t ON t.id_tag = ct.fk_tag GROUP BY p.id_puzzle"),
|
||||
|
||||
ADD_TAG("INSERT INTO tags (name) VALUES (?)"),
|
||||
DELETE_TAG("DELETE FROM tags WHERE id_tag = ?"),
|
||||
|
|
Loading…
Add table
Reference in a new issue