Stuff
This commit is contained in:
parent
eb837eab0a
commit
c6d6fb7b78
1 changed files with 1 additions and 1 deletions
|
@ -49,7 +49,7 @@ class CalculateSpace extends Command
|
||||||
//Get file size for that hour for that gallery
|
//Get file size for that hour for that gallery
|
||||||
$start = $day." ".$i.":00:00";
|
$start = $day." ".$i.":00:00";
|
||||||
$end = $day." ".$i.":59:59";
|
$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;
|
$size = DB::select($sql)[0]->size;
|
||||||
$split = explode("-", $day);
|
$split = explode("-", $day);
|
||||||
$storage = \App\Models\Storage::query()
|
$storage = \App\Models\Storage::query()
|
||||||
|
|
Loading…
Reference in a new issue