1
I’m having trouble making a query in the database. I’ve tried the same command in the database and it worked normally. Follow the code:
$resultado = mysqli_query("SELECT * FROM usuario ORDER BY nome;");
$linha = mysqli_num_rows($resultado);
while($linha = mysqli_fetch_array($resultado)){
echo "<tr>";
echo "<td>".$linha['matricula']."</td>";
echo "<td>".$linha['nome']."</td>";
echo "<td>".$linha['nivel_acesso']."</td>";
echo "</tr>";
}
Missed passing the connection to the
mysqli_query()
which is the first argument.– rray
It worked, thank you!
– Lucas Ramos