PHP mysqli_more_results() Function

Definition

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

Syntax

Object oriented style

bool mysqli::more_results ( void )

Procedural style

bool mysqli_more_results ( mysqli $link )

Parameter

ParameterIs RequiredDescription
connectionRequired.MySQL connection to use

Return

It returns TRUE on success and FALSE on failure.

Example

Checks if there are more results from a multi query


<?php//from  w w w . j  a  va  2s  .co m
$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);
?>




















Home »
  PHP Tutorial »
    Function reference »




PHP Array Functions
PHP Calendar Functions
PHP Class Functions
PHP Data Type Functions
PHP Date Functions
PHP File Functions
PHP Image Functions
PHP Math Functions
PHP MySQLi Functions
PHP SimpleXML Functions
PHP String Functions
PHP XML Functions
PHP Zip Functions