In MySQL I can perform multiple commands at once, for example:
Select * from Users; Select * from Classes;
How can I do the same when invoking the command from PHP, for example:
$sql=mysqli_query($link, "select * from Users;");
while($rows=mysqli_fetch_array($sql)){
echo "<div>$rows[0]</div><div>$rows[1]</div>";
}
However, it doesn't work:
$sql=mysqli_query($link, "select * from Users; Select * from Classes");
while($rows=mysqli_fetch_array($sql)){
echo "<div>$rows[0]</div><div>$rows[1]</div>";
}
I understand that in practice this may not be necessary. Consider I need this particular issue to simulate or to develop my own version of an interface using PHP to manage MySQL database.