This is problematic… Any fix for the next release?…
B.
(@bandonrandon)
This can be vefified by looking at Trunk:
'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' ) " )
you should be able to change this to:
'users' => $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->prefix_users INNER JOIN $wpdb->prefix_usermeta ON ($wpdb->prefix_users.ID = $wpdb->prefix_usermeta.user_id) WHERE 1 = 1 AND ( $wpdb->prefix_usermeta.meta_key = ' $wpdb->prefix_{$blog_id}_capabilities' ) " ),
This is untested so you may need to escape the $wpdb->prefix
not sure.
Actually, would look like this (untested):
'users' => $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->users INNER JOIN $wpdb->usermeta ON ($wpdb->users.ID = $wpdb->usermeta.user_id) WHERE 1 = 1 AND ( $wpdb->usermeta.meta_key = ' {$wpdb->prefix}{$blog_id}_capabilities' ) " ),
No need to escape $wpdb
when using double quotes. 🙂
See the docs on $wpdb
:
http://codex.wordpress.org/Class_Reference/wpdb#Class_Variables
http://codex.wordpress.org/Class_Reference/wpdb#Tables
Same issue here.
Any idea how to fix it?
Where do i change that code?
Thanks
@darkpollo – The issue is in /inc/class-tracking.php on line 113
. If you change the code yourself, take care, and save a copy of the original file in case you accidentally mess something up.
Thanks!
Well, is there any bigproblem if i just ignore the error?
I just found it, so it has been there months already. 😛
Yeah, I just ignored it for a long time. I don’t think it really affects the plugin very much.
I will wait for the official fix then.
Thank you!