PHP mysqli_more_results() Function

PHP mysqli_more_results() function check if there are any more query results from a multi query. Indicates if one or more result sets are available from a previous call to mysqli_multi_query().

Syntax

bool mysqli_more_results(connection);

mysqli_more_results() Function Parameter

ParameterDescription
connection :Required parameter. The MySQL connection to be used

mysqli_more_results() Function Return Value

Return Values :Returns TRUE if one or more result sets are available from a previous call to mysqli_multi_query(), otherwise FALSE.

mysqli_more_results() Function Example

<?php
$con = mysqli_connect("localhost","user","password","db");

if (mysqli_connect_errno())
{
	echo "Failed to connect to MySQL: " . mysqli_connect_error();
}

$insert_member_sql = "INSERT INTO members (id, username) VALUES('$id', '$username')";
mysqli_query($con, $insert_member_sql);

echo mysqli_more_results($con);

mysqli_close($con);
?>