mirror of
https://codeberg.org/catask-org/catask.git
synced 2025-04-20 05:43:41 -05:00
select pinned questions first
This commit is contained in:
parent
5f81017d79
commit
ab95963a88
1 changed files with 1 additions and 1 deletions
|
@ -144,7 +144,7 @@ def getAllQuestions():
|
||||||
GROUP BY question_id
|
GROUP BY question_id
|
||||||
) a ON q.id = a.question_id
|
) a ON q.id = a.question_id
|
||||||
WHERE q.answered = %s
|
WHERE q.answered = %s
|
||||||
ORDER BY (a.creation_date IS NULL), a.creation_date DESC, q.pinned DESC, q.creation_date DESC
|
ORDER BY q.pinned DESC, (a.creation_date IS NULL), a.creation_date DESC, q.creation_date DESC
|
||||||
"""
|
"""
|
||||||
|
|
||||||
cursor.execute(query, (True,))
|
cursor.execute(query, (True,))
|
||||||
|
|
Loading…
Add table
Reference in a new issue