From 0e402e7e54b5ad58d2810cd35d542807fc7a1025 Mon Sep 17 00:00:00 2001 From: Opeyemi Ibrahim Date: Fri, 11 Oct 2024 18:38:37 +0100 Subject: [PATCH] Fix database query :bug: -- :closes: #7028 --- inc/Engine/Admin/Database/OptimizationProcess.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/Engine/Admin/Database/OptimizationProcess.php b/inc/Engine/Admin/Database/OptimizationProcess.php index a901588a41..d5042e3194 100644 --- a/inc/Engine/Admin/Database/OptimizationProcess.php +++ b/inc/Engine/Admin/Database/OptimizationProcess.php @@ -124,7 +124,7 @@ protected function task( $item ) { } break; case 'database_optimize_tables': - $query = $wpdb->get_results( "SELECT table_name, data_free FROM information_schema.tables WHERE table_schema = '" . DB_NAME . "' and Engine <> 'InnoDB' and data_free > 0" ); + $query = $wpdb->get_results( "SELECT table_name AS table_name, data_free AS data_free FROM information_schema.tables WHERE table_schema = '" . DB_NAME . "' and Engine <> 'InnoDB' and data_free > 0" ); if ( $query ) { $number = 0; foreach ( $query as $table ) {