PHP mysqli: use_result() function
mysqli_use_result function / mysqli::use_result
The mysqli_use_result function / mysqli::use_result — initiate a result set retrieval.
Syntax:
Object oriented style
mysqli_result mysqli::use_result ( void )
Procedural style
mysqli_result mysqli_use_result ( mysqli $link )
Parameter:
Name | Description | Required/Optional | |
---|---|---|---|
link | A link identifier returned by mysqli_connect() or mysqli_init() | Required for procedural style only and Optional for Object oriented style |
Usage: Procedural style
mysqli_use_result(connection);
Parameter:
Name | Description | Required/Optional |
---|---|---|
connection | Specifies the MySQL connection to use. | Required |
Return value:
Returns an unbuffered result object or FALSE if an error occurred.
Version: PHP 5, PHP 7
Example of object oriented style:
Output:
user1@% -----------------
Example of the Procedural style
Output:
Connect failed: Access denied for user 'user'@'localhost' (using password: YES)
Example:
Sample Output:
user1@% -----------------
See also
Previous: thread_safe
Next: warning_count