Skip to content

Commit

Permalink
- bugfix for clear post meta
Browse files Browse the repository at this point in the history
  • Loading branch information
Hai Zheng committed Nov 28, 2023
1 parent f4fb975 commit 89fc3e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/db-optm.cls.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'");
Expand Down

0 comments on commit 89fc3e5

Please sign in to comment.