Query correction
This commit is contained in:
parent
26f51c0945
commit
8224a139f7
|
|
@ -181,7 +181,7 @@ def last_n_deals(n):
|
||||||
'''
|
'''
|
||||||
connection = sqlite3.connect(profits_database)
|
connection = sqlite3.connect(profits_database)
|
||||||
cursor = connection.cursor()
|
cursor = connection.cursor()
|
||||||
cursor.execute(f"SELECT * FROM profits_table ORDER BY timestamp DESC LIMIT {n}")
|
cursor.execute(f"SELECT * FROM profits_table ORDER BY timestamp DESC LIMIT ?",(n,))
|
||||||
result = cursor.fetchall()
|
result = cursor.fetchall()
|
||||||
connection.close()
|
connection.close()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue