神经报warning,可以正常使用……强制转换为int后正常 $school = (int)$arr['school']; $sql2 = "select * from school where id = $school limit 1"; mysqli_error可以显示错误信息 printf("Error: %s\n", mysqli_error($db));