mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-04 17:36:39 +00:00
93_DbRep: contrib 8.51.6
git-svn-id: https://svn.fhem.de/fhem/trunk@27201 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
bec4f1d821
commit
7ac3ff8131
@ -59,8 +59,9 @@ no if $] >= 5.017011, warnings => 'experimental::smartmatch';
|
|||||||
|
|
||||||
# Version History intern
|
# Version History intern
|
||||||
my %DbRep_vNotesIntern = (
|
my %DbRep_vNotesIntern = (
|
||||||
"8.51.6" => "10.02.2023 fix execute DbRep_afterproc after generating readings ".
|
"8.51.6" => "11.02.2023 fix execute DbRep_afterproc after generating readings ".
|
||||||
"Forum: https://forum.fhem.de/index.php/topic,53584.msg1262970.html#msg1262970",
|
"Forum: https://forum.fhem.de/index.php/topic,53584.msg1262970.html#msg1262970 ".
|
||||||
|
"fix MySQL 50mostFreqLogsLast2days ",
|
||||||
"8.51.5" => "05.02.2023 fix Perl Warning Forum: https://forum.fhem.de/index.php/topic,53584.msg1262032.html#msg1262032 ",
|
"8.51.5" => "05.02.2023 fix Perl Warning Forum: https://forum.fhem.de/index.php/topic,53584.msg1262032.html#msg1262032 ",
|
||||||
"8.51.4" => "01.02.2023 ignore non-numeric values in diffValue and output the erroneous record in the log ",
|
"8.51.4" => "01.02.2023 ignore non-numeric values in diffValue and output the erroneous record in the log ",
|
||||||
"8.51.3" => "22.01.2023 extend DbRep_averval avgTimeWeightMean by alkazaa, Restructuring of DbRep_averval ".
|
"8.51.3" => "22.01.2023 extend DbRep_averval avgTimeWeightMean by alkazaa, Restructuring of DbRep_averval ".
|
||||||
@ -1052,9 +1053,9 @@ sub DbRep_Set {
|
|||||||
my ($tq,$gcl);
|
my ($tq,$gcl);
|
||||||
|
|
||||||
if($prop eq "50mostFreqLogsLast2days") {
|
if($prop eq "50mostFreqLogsLast2days") {
|
||||||
$sqlcmd = "select Device, reading, count(0) AS `countA` from history where ( TIMESTAMP > (now() - interval 2 day)) group by DEVICE, READING order by countA desc, DEVICE limit 50;" if($dbmodel =~ /MYSQL/);
|
$sqlcmd = "select Device, reading, count(0) AS `countA` from history where TIMESTAMP > (NOW() - INTERVAL 2 DAY) group by DEVICE, READING order by countA desc, DEVICE limit 50;" if($dbmodel =~ /MYSQL/);
|
||||||
$sqlcmd = "select Device, reading, count(0) AS `countA` from history where ( TIMESTAMP > ('now' - '2 days')) group by DEVICE, READING order by countA desc, DEVICE limit 50;" if($dbmodel =~ /SQLITE/);
|
$sqlcmd = "select Device, reading, count(0) AS `countA` from history where TIMESTAMP > ('now' - '2 days') group by DEVICE, READING order by countA desc, DEVICE limit 50;" if($dbmodel =~ /SQLITE/);
|
||||||
$sqlcmd = "select Device, reading, count(0) AS countA from history where ( TIMESTAMP > (NOW() - INTERVAL '2' DAY)) group by DEVICE, READING order by countA desc, DEVICE limit 50;" if($dbmodel =~ /POSTGRESQL/);
|
$sqlcmd = "select Device, reading, count(0) AS countA from history where TIMESTAMP > (NOW() - INTERVAL '2' DAY) group by DEVICE, READING order by countA desc, DEVICE limit 50;" if($dbmodel =~ /POSTGRESQL/);
|
||||||
}
|
}
|
||||||
elsif ($prop eq "allDevReadCount") {
|
elsif ($prop eq "allDevReadCount") {
|
||||||
$sqlcmd = "select device, reading, count(*) as count from history group by DEVICE, READING order by count desc;";
|
$sqlcmd = "select device, reading, count(*) as count from history group by DEVICE, READING order by count desc;";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user