我该如何解决这个PHP问题? [英] How do I solve this PHP problem ?
问题描述
我的问题仍然存在于98行,这是我的php文件中的1911年!
警告:mysqli_fetch_array()要求参数1为mysqli_result,布尔值在1911行的H:\root \home \ teamwork1-001 \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
My Problem persists on line 98 which is 1911 in my php file!
Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given in H:\root\home\teamwork1-001\www\Portal\auditpdfengarnophotos.php on line 1911
while($row_typee=mysqli_fetch_array($get_typee))
<?php
set_time_limit(60);
include("connection.php");
$errors= array();
$data= array();
$get_auditorcustomers=mysqli_query($con,"select * from auditorcustomer where id='".$_GET['customeraudit']."'");
$row_auditorcustomers=mysqli_fetch_array($get_auditorcustomers);
$get_lasttwoid=mysqli_query($con,"select distinct id from auditorcustomer where customer='".$row_auditorcustomers['customer']."' and location='".$row_auditorcustomers['location']."' and category='".$_GET['category']."' and status='1' and completed='1' order by id desc limit 6 ");
if(!$get_lasttwoid){$errors['name'] = 'error.';}
if ( ! empty($errors)) {
$data['success'] = false;
$data['errors'] = $errors;
} else {
$data['success'] = true;
$data['message'] = 'Success!';
$atte=array();
while($row_lasttwoid=mysqli_fetch_array($get_lasttwoid)){
$get_auditinfo=mysqli_query($con,"select * from customeraudit where auditorcustomer='".$row_lasttwoid['id']."'");
$row_auditinfo=mysqli_fetch_array($get_auditinfo);
$get_customerauditt4=mysqli_query($con,"select * from auditapplication where customeraudit='".$row_lasttwoid['id']."' and response='0' ");
$row_customerauditt41=mysqli_fetch_array($get_customerauditt4);
$array_type4=array();
$array_audit4=array();
while($row_customerauditt4=mysqli_fetch_array($get_customerauditt4)){
$array_audit4[]=$row_customerauditt4['audit'];
$get_audit4=mysqli_query($con,"select distinct type from auditform where id='".$row_customerauditt4['audit']."' ");
$row_audit4=mysqli_fetch_array($get_audit4);
$array_type4[]=$row_audit4['type'];
}
$get_typee=mysqli_query($con, "select * from audittype where id in (".implode(",",array_unique($array_type4)).")");
$levelNATotal=0;$totalscore=0;$totalpercentage=0;$levelZeroTotal=0;
$count=0;
<big>while($row_typee=mysqli_fetch_array($get_typee))</big>
{
$levelNATotal=0;
$levelZeroTotal=0;
$question=0;
$levelTotal=0;
$levelNA=0;
$levelZero=0;
$percentage=0;
$count++;
$get_auditt=mysqli_query($con,"select * from auditform where category='".$_GET['category']."' and type='".$row_typee['id']."' and status='1'");
$question=$question + mysqli_num_rows($get_auditt);
$totalquestion=$totalquestion+$question;
while($row_auditt=mysqli_fetch_array($get_auditt)){
$get_customerauditScore=mysqli_query($con,"select * from auditapplication where customeraudit='".$row_lasttwoid['id']."' and audit='".$row_auditt['id']."' ");
$row_customerauditScore=mysqli_fetch_array($get_customerauditScore);
if($row_customerauditScore['response']=='-1'){
$get_LevelNA=mysqli_query($con,"select * from auditform where id='".$row_customerauditScore['audit']."'");
while($row_LevelNA=mysqli_fetch_array($get_LevelNA)){
$levelNA=$levelNA+intval($row_LevelNA['level']);
}
}
if($row_customerauditScore['response']=='0'){
$get_LevelZero=mysqli_query($con,"select * from auditform where id='".$row_customerauditScore['audit']."'");
while($row_LevelZero=mysqli_fetch_array($get_LevelZero)){
$levelZero=$levelZero+intval($row_LevelZero['level']);
}
}
}
$levelZeroTotal=$levelZeroTotal+$levelZero;
$levelNATotal=$levelNATotal+$levelNA;
$get_audittLevelTotal=mysqli_query($con,"select * from auditform where category='".$_GET['category']."' and type='".$row_typee['id']."' and status='1'");
while($row_audittLevelTotal=mysqli_fetch_array($get_audittLevelTotal)){
$levelTotal=$levelTotal+intval($row_audittLevelTotal['level']);}
$totalscore=$totalscore+intval(abs($levelTotal)-abs($levelZero)-abs($levelNA));$totalpercentage=$totalpercentage+$percentage;
}
$get_totalquestion=mysqli_query($con,"select * from auditform where category='".$_GET['category']."' and status='1'");
$levelTotall=0;
$get_audittLevelTotall=mysqli_query($con,"select * from auditform where category='".$_GET['category']."' and status='1'");
while($row_audittLevelTotall=mysqli_fetch_array($get_audittLevelTotall)){
$levelTotall=$levelTotall+intval($row_audittLevelTotall['level']);}
array_push($atte, array("label" => $row_auditinfo['dates'],"y" => number_format($totalscore/abs($levelTotall-intval($levelNATotal))*100,2)));
}}
/*$data['allatte']= $atte; }
echo json_encode($data);
ob_end_flush(); */
$dataPoints1 = array(
array("x" => "2018-07-21", "y" => 67.80),
array("x" => "2018-07-13", "y" => 67.45),
array("x" => "2018-06-22", "y" => 70.63)
);
?>
我尝试过:
while($ row_typee = mysqli_fetch_array($ get_typee,MYSQLI_ASSOC))
I尝试添加这个!
如果有人可以为我修改这个并告诉我原因是什么!
What I have tried:
while($row_typee=mysqli_fetch_array($get_typee,MYSQLI_ASSOC))
I tried adding this!
Please if someone can modify this for me and teach me what the reason is !
推荐答案
row_typee = mysqli_fetch_array(
row_typee=mysqli_fetch_array(
get_typee))
get_typee))
<?php
set_time_limit(60);
include("connection.php");
errors = array();
errors= array();
这篇关于我该如何解决这个PHP问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!