PHP mysqli: refresh() function
mysqli_refresh function / mysqli::refresh
The mysqli_refresh function / mysqli::refresh — refreshes
Syntax:
Object oriented style
public bool mysqli::refresh ( int $options )
Procedural style
int mysqli_refresh ( resource $link , int $options )
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 | |
options | The options to refresh, using the MYSQLI_REFRESH_* constants as documented within the MySQLi constants documentation. | Required |
Usage: Procedural style
mysqli_refresh(connection,options);
Parameter:
Name | Description | Required / Optional |
---|---|---|
connection | Specifies the MySQL connection to use | Required |
options | The options to refresh. Can be one of more of the following (separated by OR):
|
Required |
Return value:
TRUE if the refresh was a success, otherwise FALSE
Version: PHP 5, PHP 7
Example
<?php
$con=mysqli_connect("localhost","user1","datasoft123","hr");
if (mysqli_connect_errno($con)){
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
mysqli_refresh($con,MYSQLI_REFRESH_LOG);
mysqli_close($con);
?>
See also
Previous: reap_async_query
Next: release_savepoint
PHP: Tips of the Day
Returns all elements in an array except for the first one
Example:
<?php function tips_tail($items) { return count($items) > 1 ? array_slice($items, 1) : $items; } print_r(tips_tail([1, 5, 7])); ?>
Output:
Array ( [0] => 5 [1] => 7 )
- Weekly Trends
- Java Basic Programming Exercises
- SQL Subqueries
- Adventureworks Database Exercises
- C# Sharp Basic Exercises
- SQL COUNT() with distinct
- JavaScript String Exercises
- JavaScript HTML Form Validation
- Java Collection Exercises
- SQL COUNT() function
- SQL Inner Join
- JavaScript functions Exercises
- Python Tutorial
- Python Array Exercises
- SQL Cross Join
- C# Sharp Array Exercises