$wpdb->prepare() warning in WordPress 3.5
Remove the call to $wpdb->prepare(): $result = $wpdb->get_var( “SELECT DISTINCT meta_value FROM $metatable WHERE meta_key LIKE ‘%matchme%’ AND meta_value IS NOT NULL AND meta_value <> ”” ); In this case, the $wpdb->prepare() function is not doing anything. There are no variables holding unknown values, therefore there is no need to sanitize them. If you did … Read more