mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-09 18:45:54 +02:00
squid-accounting: fix monthly dbmove funktion to put values in history table
This commit is contained in:
committed by
Michael Tremer
parent
57e86b5593
commit
a8e3b15d77
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user