Created
July 1, 2013 23:15
-
-
Save simonkberg/5905474 to your computer and use it in GitHub Desktop.
Fix for missing wp_users-table error in wp-cron
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: inc/class-tracking.php | |
=================================================================== | |
--- inc/class-tracking.php (revision 734869) | |
+++ inc/class-tracking.php (working copy) | |
@@ -110,7 +110,7 @@ | |
'name' => get_bloginfo( 'name' ), | |
'version' => get_bloginfo( 'version' ), | |
'multisite' => is_multisite(), | |
- 'users' => $wpdb->get_var( "SELECT COUNT(*) FROM wp_users INNER JOIN wp_usermeta ON (wp_users.ID = wp_usermeta.user_id) WHERE 1 = 1 AND ( wp_usermeta.meta_key = 'wp_{$blog_id}_capabilities' ) " ), | |
+ 'users' => $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->users AS u INNER JOIN $wpdb->usermeta AS m ON (u.ID = m.user_id) WHERE 1 = 1 AND ( m.meta_key = 'wp_{$blog_id}_capabilities' ) " ), | |
'lang' => get_locale(), | |
), | |
'pts' => $pts, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment