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);
Parameter | Description |
---|---|
connection : | Required parameter. The MySQL connection to be used |
Return Values : | Returns TRUE if one or more result sets are available from a previous call to mysqli_multi_query(), otherwise FALSE. |
<?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); ?>