[wp-hackers] Access custom table using global wpdb not working
chris.hearn01 at ntlworld.com
Tue Dec 27 18:17:22 UTC 2016
Just recently a custom plugin on my site stopped working properly (after
The following line that fails is simply getting a count from a custom
$num = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->custom_tablename");
// result is null because it appears that $wpdb->custom_tablename is
$num_wpUsers = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->users"); //
this works as expected!
If there some change that only allows "standard" wordpress table names now?
Thanks for any help!
This email has been checked for viruses by Avast antivirus software.
More information about the wp-hackers