update
This commit is contained in:
@@ -118,10 +118,6 @@ if ($type == "database_size") {
|
|||||||
$fileSizeKilobytes = $fileSizeBytes / 1024; // KB
|
$fileSizeKilobytes = $fileSizeBytes / 1024; // KB
|
||||||
$fileSizeMegabytes = $fileSizeKilobytes / 1024; // MB
|
$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
|
// Prepare the JSON response
|
||||||
$data = [
|
$data = [
|
||||||
@@ -129,7 +125,6 @@ if ($type == "database_size") {
|
|||||||
'size_bytes' => $fileSizeBytes,
|
'size_bytes' => $fileSizeBytes,
|
||||||
'size_kilobytes' => round($fileSizeKilobytes, 2),
|
'size_kilobytes' => round($fileSizeKilobytes, 2),
|
||||||
'size_megabytes' => round($fileSizeMegabytes, 2),
|
'size_megabytes' => round($fileSizeMegabytes, 2),
|
||||||
'data_table_records' => $recordCount
|
|
||||||
];
|
];
|
||||||
|
|
||||||
// Output the JSON response
|
// Output the JSON response
|
||||||
|
|||||||
Reference in New Issue
Block a user