DB config
This commit is contained in:
parent
57102208bc
commit
333475a826
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user