您好我收到错误消息:
Warning: Missing argument 2 for wpdb::prepare(), called in /home/url.com/wp-content/plugins/WPEC-Personalize-3.8/wpec-personalization.php on line 322 and defined in /home/url.com/wp-includes/wp-db.php on line 990
我在第 322 行找到了代码:
$add = $wpdb->get_var($wpdb->prepare("SELECT enabled FROM ". $table_name ." WHERE pers_id = ". $myresults->pers_id." AND product_id = ".$product_id));
我正在尝试将其更新为新的 wordpress 标准:
$add = $wpdb->get_var$wpdb->prepare("SELECT enabled FROM . %d . WHERE pers_id = . %d. AND product_id = .%s",$table_name, $myresults->pers_id, $product_id));
我不确定我错过了什么。不幸的是,我不是这个插件的作者,他也没有计划任何更新:-(。
任何帮助将不胜感激!