From cc75e524e19f6d1cfa152260af63a44ce7a80045 Mon Sep 17 00:00:00 2001 From: nasseeder1 Date: Sun, 6 Jan 2019 17:13:00 +0000 Subject: [PATCH] 93_DbRep: sort problem in diffValue Forum:#msg882082 git-svn-id: https://svn.fhem.de/fhem/trunk@18163 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/CHANGED | 1 + fhem/FHEM/93_DbRep.pm | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/fhem/CHANGED b/fhem/CHANGED index 08e77310f..0c5964f5b 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,5 +1,6 @@ # Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # Do not insert empty lines here, update check depends on it. + - bugfix: 93_DbRep: sort problem in diffValue Forum:#msg882082 - bugfix: 98_weekprofile: fix f18 style - feature: 98_weekprofile: Force to send complete week profile Attr forceCompleteProfile diff --git a/fhem/FHEM/93_DbRep.pm b/fhem/FHEM/93_DbRep.pm index 9d5fa9279..bbe2132f5 100644 --- a/fhem/FHEM/93_DbRep.pm +++ b/fhem/FHEM/93_DbRep.pm @@ -3,7 +3,7 @@ ########################################################################################################## # 93_DbRep.pm # -# (c) 2016-2018 by Heiko Maaz +# (c) 2016-2019 by Heiko Maaz # e-mail: Heiko dot Maaz at t-online dot de # # This Module can be used to select and report content of databases written by 93_DbLog module @@ -57,6 +57,7 @@ no if $] >= 5.017011, warnings => 'experimental::smartmatch'; # Versions History intern our %DbRep_vNotesIntern = ( + "8.9.9" => "06.01.2019 diffval_DoParse: 'ORDER BY TIMESTAMP' added to statements Forum:https://forum.fhem.de/index.php/topic,53584.msg882082.html#msg882082", "8.9.8" => "27.11.2018 minor fix in deviceRename, commandref revised ", "8.9.7" => "21.11.2018 DbRep_firstconnect now uses attribute \"timeout\" ", "8.9.6" => "15.11.2018 fix PERL WARNING: Use of uninitialized value \$fref in pattern match (m//), sub DbRep_sec2hms for hms transforming", @@ -3318,9 +3319,9 @@ sub diffval_DoParse($) { } if ($IsTimeSet || $IsAggrSet) { - $sql = DbRep_createSelectSql($hash,"history",$selspec,$device,$reading,"'$runtime_string_first'","'$runtime_string_next'",''); + $sql = DbRep_createSelectSql($hash,"history",$selspec,$device,$reading,"'$runtime_string_first'","'$runtime_string_next'",'ORDER BY TIMESTAMP'); } else { - $sql = DbRep_createSelectSql($hash,"history",$selspec,$device,$reading,undef,undef,''); + $sql = DbRep_createSelectSql($hash,"history",$selspec,$device,$reading,undef,undef,'ORDER BY TIMESTAMP'); } Log3 ($name, 4, "DbRep $name - SQL execute: $sql");