The mysqli_more_results() function checks if there are more results from a multi query.
Object oriented style
bool mysqli::more_results ( void )
Procedural style
bool mysqli_more_results ( mysqli $link )
Parameter | Is Required | Description |
---|---|---|
connection | Required. | MySQL connection to use |
It returns TRUE on success and FALSE on failure.
Checks if there are more results from a multi query
<?php/*from w w w . java2 s . c om*/
$con=mysqli_connect("localhost","my_user","my_password","my_db");
if (mysqli_connect_errno($con)){
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$sql = "SELECT Lastname FROM Persons;SELECT Country FROM Customers";
// Execute multi query
mysqli_multi_query($con,$sql);
printf("%s\n",mysqli_more_results($con));
mysqli_close($con);
?>