Hello,
i use a MySQL database in this database are coming every minute data.
For the History of this data i have a own dashbaord, the user select a “batch number” and then all data to this number are loading.
i uses follow sql for this:
SELECT
UNIX_TIMESTAMP(zeit) as time_sec,
cast(replace(WERT1,',','.') as double) as "WERT1",
cast(replace(WERT2,',','.') as double) as "WERT2",
cast(replace(WERT3,',','.') as double) as "WERT3",
cast(replace(WERT4,',','.') as double) as "WERT4"
FROM exporttable
WHERE AKTZEIT BETWEEN (SELECT min(AKTZEIT) FROM exporttable WHERE BATCH LIKE $Batch) AND (SELECT max(AKTZEIT) FROM exporttable WHERE BATCH LIKE $Batch)
it is working but, i have one problem:
the data comes every minute, but wenn the machine is off i have no data, and the when the machine are working after many hours the laste value und the current value are “connected”:
i would like to have the line on zero and no connections.
I found no solution for this Problem. Can everybody help me?