Query correction

This commit is contained in:
Nicolás Sánchez 2024-11-28 15:49:23 -03:00
parent 26f51c0945
commit 8224a139f7
1 changed files with 1 additions and 1 deletions

View File

@ -181,7 +181,7 @@ def last_n_deals(n):
'''
connection = sqlite3.connect(profits_database)
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()
connection.close()