From c18360a1ad2e3a3c5b8a581bec371467f30531e1 Mon Sep 17 00:00:00 2001 From: ReneKlever Date: Sat, 12 Apr 2025 11:40:21 +0200 Subject: [PATCH] Update db_operations.py --- db_operations.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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()