As I read the php manual on this function, I though that I was executing it correctly. Unfortunately I'm getting this error:
Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given on line 94
with this code:
$upSQL = "SELECT * FROM rated_teams WHERE server='$server' AND name='$teamname' AND master='2' ORDER BY id ASC;";
$upSQL .="SELECT name, rating FROM rated_teams WHERE server='$server' AND master='1'";
//echo $upSQL. "<br />";
$upresult=mysqli_multi_query($con, $upSQL);
$i=1;
$j=1;
$myrating=0;
while($row = mysqli_fetch_array($upresult)) { //LINE 94
if ($row['win'] == 1 && $i <= 3) {
echo $i++ . "first 3 wins <br />";
$myrating+=10;
$j++;
} else {
if ($row['name'] == $opposer && $row['master'] == 1) {
echo $opposer . " " . $row['rating'];
echo $j++. " j<br />";
}
}
}
echo $myrating;
So, the direct question is: Why is this code incorrect?