I have my connection to the bd so
$conn = new mysqli(server,user,pass,mainDataBase);
un procedimiento almacenado que devuelve una tabla
$sql = "call sp_escap()";
$result = $conn->query($sql);
y las imprimo en el label
while ($r=mysqli_fetch_array($result)) {
echo '<label href="#collapse'.$r['IdEscenarios'].'" class="nav-toggle">'.$r['NombreEsc'].'</label><br>';
}
?>
so far everything is fine but when I want to make another query I get the error
Warning: mysqli_fetch_array () expects parameter 1 to be mysqli_result
and I have to comment on my first while
so that the second query can be executed.
Help please How to do the two consultations in the same file?