This commit is contained in:
PaulVua
2025-02-11 14:55:10 +01:00
parent ecd61f765a
commit 9774215e7c

View File

@@ -118,10 +118,6 @@ if ($type == "database_size") {
$fileSizeKilobytes = $fileSizeBytes / 1024; // KB
$fileSizeMegabytes = $fileSizeKilobytes / 1024; // MB
// Query the number of records in the `data` table
$query = "SELECT COUNT(*) AS total_records FROM data";
$result = $db->query($query);
$recordCount = $result ? $result->fetch(PDO::FETCH_ASSOC)['total_records'] : 0;
// Prepare the JSON response
$data = [
@@ -129,7 +125,6 @@ if ($type == "database_size") {
'size_bytes' => $fileSizeBytes,
'size_kilobytes' => round($fileSizeKilobytes, 2),
'size_megabytes' => round($fileSizeMegabytes, 2),
'data_table_records' => $recordCount
];
// Output the JSON response