mirror of
https://github.com/PhoenixTwoFive/karaoqueue.git
synced 2025-07-05 17:44:31 +02:00
Use bootstrap-table for fancy ajax tables.
This commit is contained in:
@ -74,6 +74,7 @@ def create_done_song_view():
|
||||
|
||||
def get_list():
|
||||
conn = open_db()
|
||||
conn.row_factory = sqlite3.Row
|
||||
cur = conn.cursor()
|
||||
cur.execute("SELECT * FROM Liste")
|
||||
return cur.fetchall()
|
||||
@ -141,6 +142,20 @@ def delete_entry(id):
|
||||
return True
|
||||
|
||||
|
||||
def delete_entries(ids):
|
||||
idlist = []
|
||||
for x in ids:
|
||||
idlist.append( (x,) )
|
||||
try:
|
||||
conn = open_db()
|
||||
cur = conn.cursor()
|
||||
cur.executemany("DELETE FROM entries WHERE id=?", idlist)
|
||||
conn.commit()
|
||||
conn.close()
|
||||
return cur.rowcount
|
||||
except sqlite3.Error as error:
|
||||
return -1
|
||||
|
||||
def delete_all_entries():
|
||||
conn = open_db()
|
||||
cur = conn.cursor()
|
||||
|
Reference in New Issue
Block a user