谁能告诉我我的错误在哪里?
if (isset($_GET['acbid']) && !empty($_GET["acbid"])){
$agent_id=$_GET['acbid'];
echo $agent_id;
date_default_timezone_set('Asia/Hebron');
$month=date("m");
$day=date("d");
$year=date("y");
if ($day>=26) {
$monthstt5= strtotime($year."-".$month."-"."26");
$finish_date5 = date("d-m-Y", strtotime("+1 month",$monthstt5));
}else{
$finish_date5 = date("d-m-Y", strtotime($year."-".$month."-"."26"));
}
$agent_id=$_GET['acbid'];
$query ="select * from `bills` where `agent_id`=$agent_id ";
$result = mysqli_query($conn,$query) or die(mysqli_error($conn));
if (!$result) {
echo "Could not successfully run query ($sql) from DB: " . mysql_error();
exit;
}else{while($row = mysqli_fetch_assoc($result)){
$finish_date2=$row['finish_date'];
$expire_time = strtotime($finish_date2);
$today = date("Y-m-d");
$today_time = strtotime($today);
echo mysqli_error($conn);
if ($expire_time <= $today_time){
echo "sadasdasd";
if (($row['type']=='m') and ($row['status']=='on')) {
$line_number=$row['line_number'];
$total=$row['daily']+$row['monthly']+$row['sim'];
$monthstt = strtotime($year."-".$month."-"."26");
$finish_date3 = date("d-m-Y", strtotime("+1 month",$monthstt));
$query=" UPDATE `bills` SET `total` = '$total', `start_date`='$finish_date2',`finish_date`='$finish_date5' WHERE `line_number` ='$line_number'and `agent_id` = '$agent_id'";
$result = mysqli_query($conn,$query) ;
echo mysqli_error($conn);
}elseif (($row['type']=='d') and($row['status']=='on')) {
$mon=$row['monthly'];
$line_number=$row['line_number'];
$total=$row['daily']+$row['sim']+$mon;
$query=" select * from line_pricing WHERE `line_number` ='$line_number'";
$result = mysqli_query($conn,$query) ;
echo mysqli_error($conn);
$monthly=$row['monthly'];
$finaltotal=$total+$monthly;
$query=" UPDATE `bills` SET `type`='m',`monthly`= '$monthly',`total` = '$finaltotal', `start_date`='$finish_date2',`finish_date`='$finish_date5' WHERE `line_number` ='$line_number' and `agent_id` = '$agent_id' ";
$result = mysqli_query($conn,$query) ;
echo mysqli_error($conn);
}
}
}
}
}
错误是&#34;警告:mysqli_fetch_assoc()要求参数1为mysqli_result,布尔值在第41行&#34; C / \ wamp64 \ www \ cellcom \ lines system \ administrative \ bills.php中给出;