I am creating a code in html and php where I get the error "mysqli_fetch_assoc () expects parameter 1 to be mysqli_result, boolean given in", this code will show scores for a mini-golf tournament. the code gives me error in the code below.
<?php
if($total){ do {
$query1 = "SELECT nome from jogador WHERE nometeam = ".$linha['nometeam'];
$dados1 = mysqli_query($conn, $query1);
$linha1 = mysqli_fetch_assoc($dados1);
print $query1
?>