DB config

This commit is contained in:
Manuel Weiser 2024-05-11 09:36:15 +02:00
parent 57102208bc
commit 333475a826

View File

@ -2,6 +2,7 @@
# -*- coding: utf-8 -*-
from datetime import datetime, timedelta
import sys
import sqlite3
@ -14,6 +15,7 @@ try:
watt = sys.argv[2]
except:
print("Fehlende Command Line Inputs")
exit(0)
##
@ -40,7 +42,7 @@ def updateLast(cursor):
## hole letztes Ladungs-Datum
sql = '''
SELECT id, l_date FROM bike_loading ORDER BY d_date DESC LIMIT 1;
SELECT id, l_date FROM bike_loading ORDER BY l_date DESC LIMIT 1;
'''
cursor.execute(sql)
row = cursor.fetchone()