This commit is contained in:
2023-12-08 05:31:56 +01:00
parent 20de98bc05
commit 5a228b3f75
2 changed files with 82 additions and 1 deletions

View File

@@ -45,7 +45,7 @@ class Game {
async generateQuestions(themeId) {
try {
const [rows] = await pool.execute(
'SELECT * FROM questions ORDER BY RAND() LIMIT 10 WHERE theme = ?', [themeId],
'SELECT * FROM questions WHERE theme = ? ORDER BY RAND() LIMIT 10', [themeId],
);
rows.forEach(async row => {
const question = new Question(row.id, row.question);