mirror of
https://github.com/TheCommsChannel/TC2-BBS-mesh.git
synced 2025-08-08 06:32:15 -04:00
Update db_operations.py
This commit is contained in:
parent
32ece9e0d8
commit
c18360a1ad
1 changed files with 7 additions and 1 deletions
|
@ -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,))
|
c.execute("SELECT id, subject, sender_short_name, date, unique_id FROM bulletins WHERE board = ? COLLATE NOCASE", (board,))
|
||||||
return c.fetchall()
|
return c.fetchall()
|
||||||
|
|
||||||
def get_hot_bulletin():
|
def get_hot_bulletins():
|
||||||
conn = get_db_connection()
|
conn = get_db_connection()
|
||||||
c = conn.cursor()
|
c = conn.cursor()
|
||||||
c.execute("SELECT date FROM bulletins order by date desc")
|
c.execute("SELECT date FROM bulletins order by date desc")
|
||||||
return c.fetchone()
|
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):
|
def get_bulletin_content(bulletin_id):
|
||||||
conn = get_db_connection()
|
conn = get_db_connection()
|
||||||
c = conn.cursor()
|
c = conn.cursor()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue