squid-accounting: fix monthly dbmove funktion to put values in history table

This commit is contained in:
Alexander Marx
2015-05-03 05:24:39 +02:00
committed by Michael Tremer
parent 57e86b5593
commit a8e3b15d77

View File

@@ -93,8 +93,10 @@ sub delbefore {
}
sub movedbdata {
&connectdb;
$dbh->do("insert into ACCT_HIST select datetime(TIME_RUN,'unixepoch'),NAME,SUM(BYTES) from ACCT where datetime(TIME_RUN,'unixepoch') < datetime('now','start of month') group by NAME,datetime(TIME_RUN,'unixepoch');");
$dbh->do("DELETE FROM ACCT WHERE datetime(TIME_RUN,'unixepoch') < date('now','start of month');");
&closedb;
}
sub gethourgraphdata {