From 89fc3e5471f9d3199d68b31c1e8b7f2478697d42 Mon Sep 17 00:00:00 2001 From: Hai Zheng Date: Tue, 21 Nov 2023 14:24:54 -0500 Subject: [PATCH] - bugfix for clear post meta --- src/db-optm.cls.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/db-optm.cls.php b/src/db-optm.cls.php index fad76a2c1..eaa36ccb3 100644 --- a/src/db-optm.cls.php +++ b/src/db-optm.cls.php @@ -101,7 +101,7 @@ public function db_count($type, $ignore_multisite = false) return array_sum(array_column($res, 0)); case 'orphaned_post_meta': - return $wpdb->get_var("SELECT COUNT(a.*) FROM `$wpdb->postmeta` a LEFT JOIN `$wpdb->posts` b ON b.ID=a.post_id WHERE b.ID IS NULL"); + return $wpdb->get_var("SELECT COUNT(*) FROM `$wpdb->postmeta` a LEFT JOIN `$wpdb->posts` b ON b.ID=a.post_id WHERE b.ID IS NULL"); case 'auto_draft': return $wpdb->get_var("SELECT COUNT(*) FROM `$wpdb->posts` WHERE post_status = 'auto-draft'");