$select = "SELECT rejected_id FROM booking_table WHERE id = '$booking_id'";
$result=mysqli_query($link,$select);
$row=mysqli_fetch_assoc($result);
$count = mysqli_num_rows($result);
echo $count ;
$rejected_id = $row['rejected_id'] ;
if($count>0){
echo "enetr";
$string = $rejected_id_ . "," . $rejected_id;
}
else{
echo 'as';
$string = $rejected_id_;
}
I am getting count as 1.Even if the query gives zero rows i.e it always enter if condition ,it never enters else condition.
我没有得到解决方案。 我得数为1.即使查询给出零行,即它总是进入条件,它永远不会进入其他条件。 我没有得到解决方案。