This commit is contained in:
PaulVua
2025-02-05 17:37:27 +01:00
parent 46303b9c19
commit d98eb48535
5 changed files with 284 additions and 71 deletions

View File

@@ -17,7 +17,7 @@ conn = sqlite3.connect("/var/www/nebuleair_pro_4g/sqlite/sensors.db")
cursor = conn.cursor()
# Retrieve the last 10 sensor readings
cursor.execute("SELECT * FROM data ORDER BY timestamp DESC LIMIT 10")
cursor.execute("SELECT * FROM data_NPM ORDER BY timestamp DESC LIMIT 10")
rows = cursor.fetchall()
rows.reverse() # Reverse the order in Python (to get ascending order)