2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 18:59:33 +00:00

93_DbLog.pm: Bugfix for last commit r9716.

git-svn-id: https://svn.fhem.de/fhem/trunk@9717 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rapster 2015-10-29 14:52:57 +00:00
parent 06158ff8e9
commit 36604be24a

View File

@ -1342,7 +1342,7 @@ sub DbLog_reduceLog($@) {
my $sth_upd = $dbh->prepare_cached("UPDATE history SET TIMESTAMP=?, EVENT=?, VALUE=? WHERE (DEVICE=?) AND (READING=?) AND (TIMESTAMP=?) AND (VALUE=?)");
my $sth_delD = $dbh->prepare_cached("DELETE FROM history WHERE (DEVICE=?) AND (READING=?) AND (TIMESTAMP=?)");
my $sth_updD = $dbh->prepare_cached("UPDATE history SET TIMESTAMP=?, EVENT=?, VALUE=? WHERE (DEVICE=?) AND (READING=?) AND (TIMESTAMP=?)");
my $sth_get = $dbh->prepare("SELECT TIMESTAMP,DEVICE,'',READING,VALUE FROM history WHERE ".($filter ? $filter : '')."TIMESTAMP < ".$cmd." ORDER BY TIMESTAMP ASC"); # '' was EVENT, no longer in use
my $sth_get = $dbh->prepare("SELECT TIMESTAMP,DEVICE,'',READING,VALUE FROM history WHERE ".(($a[-1] =~ /^INCLUDE=.+:.+$/i) ? $filter : '')."TIMESTAMP < ".$cmd." ORDER BY TIMESTAMP ASC"); # '' was EVENT, no longer in use
$sth_get->execute();
do {