Stuff
This commit is contained in:
parent
cae7c158e9
commit
1f16c0c90e
1 changed files with 1 additions and 1 deletions
|
@ -47,7 +47,7 @@ class Traffic extends Authenticatable
|
||||||
];
|
];
|
||||||
|
|
||||||
public static function getLastDays(int $days = 7) {
|
public static function getLastDays(int $days = 7) {
|
||||||
$sql = "SELECT year, month, day, SUM(traffic) AS `traffic` FROM traffic WHERE tenant = 1 GROUP BY year, month, day ORDER BY date DESC LIMIT ".$days.";";
|
$sql = "SELECT year, month, SUM(traffic) AS `traffic` FROM traffic WHERE tenant = 1 GROUP BY year, month, day ORDER BY date DESC LIMIT ".$days.";";
|
||||||
$res = DB::select($sql);
|
$res = DB::select($sql);
|
||||||
|
|
||||||
$now = new \DateTime( $days." days ago", new \DateTimeZone('UTC'));
|
$now = new \DateTime( $days." days ago", new \DateTimeZone('UTC'));
|
||||||
|
|
Loading…
Reference in a new issue