PHP mysqli_refresh()Functions

PHP mysqli 参考手册PHP mysqli Reference Manual


Definition and Usage

The mysqli_refresh() function refreshes tables or caches, or resets replication server information.


Syntax

mysqli_refresh(connection,options);

Parameters Description
connection Required. Specifies the MySQL connection to use.
options The options to refresh. Can be one or more of the following (separated by OR):
  • MYSQLI_REFRESH_GRANT - Refreshes the grant tables
  • MYSQLI_REFRESH_LOG - Refreshes the log
  • MYSQLI_REFRESH_TABLES - Refreshes the table cache
  • MYSQLI_REFRESH_HOSTS - Refreshes the host cache
  • MYSQLI_REFRESH_STATUS - Resets status variables
  • MYSQLI_REFRESH_THREADS - Refreshes the thread cache
  • MYSQLI_REFRESH_SLAVE - Resets master server information, restarts the slave server
  • MYSQLI_REFRESH_MASTER - Removes binary log files from the binary log index, and truncates the index file.

Technical Details

Return value: Returns TRUE on success, or FALSE on failure.
PHP Version: 5.3+


PHP mysqli 参考手册PHP mysqli Reference Manual Other Extensions