The mysqli_more_results() function checks if there are any more results from a multi query.
mysqli_more_results(connection);