Buongiorno ho il seguente codice che riposto:

codice HTML:
$query = "SELECT * FROM atleta AS a LEFT JOIN gara AS g LEFT JOIN tempi AS t WHERE t.id_gara = g.id AND t.id_atleta = a.id ORDER BY g.gara ASC;";
$res = mysqli_query($conn,$query)

<?php  while ($res_assoc = mysqli_fetch_array($res)) : ?>                        <tr>                            <td><?php echo htmlspecialchars(stripcslashes($res_assoc['cognome'])); ?></td>                            <td><?php echo htmlspecialchars(stripcslashes($res_assoc['nome'])); ?></td>                            <td><?php echo htmlspecialchars(stripcslashes($res_assoc['sesso'])); ?></td>                            <td><?php echo htmlspecialchars(stripcslashes($res_assoc['gara'])); ?></td>                            <td><?php echo htmlspecialchars(stripcslashes($res_assoc['totale'])); ?></td>                        </tr><?php endwhile; ?>
Ma, appena provo ad avviarla mi restituisce questo errore.

Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given in /web/htdocs/www.itafinisher.it/home/index.php on line 147

La riga 147 è quella dove ho inserito il while

Qualcuno Sto arrivando! darmi un supporto ?

Grazie