diff --git a/db_operations.py b/db_operations.py index e5efe6d..1fb31d5 100644 --- a/db_operations.py +++ b/db_operations.py @@ -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()