我正在设置一些插件,并且在表中有一个用于参数设置的“编辑”按钮,但是每当我单击该“编辑”按钮时,我都会收到以下警告:
警告:count():参数必须是在第67行的C:\ UniServerZ \ www \ itamgab \ wp-content \ plugins \ gab-receitas \ add_unidade_medida.php中实现Countable的数组或对象。 / strong>
我已经多次搜索该错误,检查了几篇文章,但没有一个解决了这个问题,老实说,我不知道该怎么办。
这是我正在使用的代码:
if ($_REQUEST["edit"]){
$button = "Editar";
$id_edit = $_REQUEST["edit"];
$count_rows = $wpdb->get_row("SELECT * FROM win_gab_unidade_medida WHERE idUnidadeMedida = $id_edit");
if (count($count_rows) > 0){
$desc_edit = $wpdb->get_row("SELECT * FROM win_gab_unidade_medida WHERE idUnidadeMedida = $id_edit");
}