From c6d6fb7b784c83465f3e0a39b64cb5e832579421 Mon Sep 17 00:00:00 2001 From: Kekskurse Date: Tue, 12 Jan 2021 19:28:35 +0100 Subject: [PATCH] Stuff --- app/Console/Commands/CalculateSpace.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Console/Commands/CalculateSpace.php b/app/Console/Commands/CalculateSpace.php index 60abeac..12bd165 100644 --- a/app/Console/Commands/CalculateSpace.php +++ b/app/Console/Commands/CalculateSpace.php @@ -49,7 +49,7 @@ class CalculateSpace extends Command //Get file size for that hour for that gallery $start = $day." ".$i.":00:00"; $end = $day." ".$i.":59:59"; - $sql = "SELECT SUM(size) AS size FROM `go-mysql-admin`.images WHERE gallery = ".$gallery->id." AND uploaded_at < \"".$start."\" AND (deleted_at > \"".$end."\" OR deleted_at IS NULL);"; + $sql = "SELECT SUM(size) AS size FROM images WHERE gallery = ".$gallery->id." AND uploaded_at < \"".$start."\" AND (deleted_at > \"".$end."\" OR deleted_at IS NULL);"; $size = DB::select($sql)[0]->size; $split = explode("-", $day); $storage = \App\Models\Storage::query()