Update db_operations.py

This commit is contained in:
ReneKlever 2025-04-12 11:40:21 +02:00 committed by GitHub
parent 32ece9e0d8
commit c18360a1ad
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -96,12 +96,18 @@ def get_bulletins(board):
c.execute("SELECT id, subject, sender_short_name, date, unique_id FROM bulletins WHERE board = ? COLLATE NOCASE", (board,))
return c.fetchall()
def get_hot_bulletin():
def get_hot_bulletins():
conn = get_db_connection()
c = conn.cursor()
c.execute("SELECT date FROM bulletins order by date desc")
return c.fetchone()
def get_hot_bulletin(board):
conn = get_db_connection()
c = conn.cursor()
c.execute("SELECT date FROM bulletins WHERE board = ? COLLATE NOCASE order by date desc", (board,))
return c.fetchone()
def get_bulletin_content(bulletin_id):
conn = get_db_connection()
c = conn.cursor()